diff options
author | Bill Wohler <wohler@newt.com> | 2014-02-23 18:04:35 -0800 |
---|---|---|
committer | Bill Wohler <wohler@newt.com> | 2014-02-23 18:04:35 -0800 |
commit | 3e93bafb95608467e438ba7f725fd1f020669f8c (patch) | |
tree | f2f90109f283e06a18caea3cb2a2623abcfb3a92 /lisp/emacs-lisp/backquote.el | |
parent | 791c0d7634e44bb92ca85af605be84ff2ae08963 (diff) | |
parent | e918e27fdf331e89268fc2c9d7cf838d3ecf7aa7 (diff) | |
download | emacs-3e93bafb95608467e438ba7f725fd1f020669f8c.tar.gz |
Merge from trunk; up to 2014-02-23T23:41:17Z!lekktu@gmail.com.
Diffstat (limited to 'lisp/emacs-lisp/backquote.el')
-rw-r--r-- | lisp/emacs-lisp/backquote.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index 2dc84e9ddfb..a497acd637e 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el @@ -1,10 +1,10 @@ ;;; backquote.el --- implement the ` Lisp construct -;; Copyright (C) 1990, 1992, 1994, 2001-2013 Free Software Foundation, +;; Copyright (C) 1990, 1992, 1994, 2001-2014 Free Software Foundation, ;; Inc. ;; Author: Rick Sladkey <jrs@world.std.com> -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: extensions, internal ;; Package: emacs @@ -153,11 +153,18 @@ LEVEL is only used internally and indicates the nesting level: (list 'quote s)))) ((eq (car s) backquote-unquote-symbol) (if (<= level 0) - (cons 1 (nth 1 s)) + (if (> (length s) 2) + ;; We could support it with: (cons 2 `(list . ,(cdr s))) + ;; But let's not encourage such uses. + (error "Multiple args to , are not supported: %S" s) + (cons 1 (nth 1 s))) (backquote-delay-process s (1- level)))) ((eq (car s) backquote-splice-symbol) (if (<= level 0) - (cons 2 (nth 1 s)) + (if (> (length s) 2) + ;; (cons 2 `(append . ,(cdr s))) + (error "Multiple args to ,@ are not supported: %S" s) + (cons 2 (nth 1 s))) (backquote-delay-process s (1- level)))) ((eq (car s) backquote-backquote-symbol) (backquote-delay-process s (1+ level))) |