From: Stefan Monnier Date: Tue, 8 Oct 2013 04:30:31 +0000 (-0400) Subject: * lisp/emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@ X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1340 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f2223371ed7a582d8eb65311322e59da20742f98;p=emacs.git * lisp/emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@ with more than one argument. Fixes: debbugs:15538 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db02ef7a67f..fd132cad1a2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-10-08 Stefan Monnier + * emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@ + with more than one argument (bug#15538). + * mpc.el (mpc-songs-jump-to): Adjust to different playlist format. * vc/pcvs.el: Use lexical-binding. 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)))