summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/backquote.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/backquote.el')
-rw-r--r--lisp/emacs-lisp/backquote.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index 2dc84e9ddfb..81d11ff4f77 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -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)))