aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2013-10-08 00:30:31 -0400
committerStefan Monnier2013-10-08 00:30:31 -0400
commitf2223371ed7a582d8eb65311322e59da20742f98 (patch)
tree5c664fdeee3351f46ed8c209885df1fc28da70b3 /lisp
parent87c4314d27420e5da8c2f6f97b4cfd94902f1d04 (diff)
downloademacs-f2223371ed7a582d8eb65311322e59da20742f98.tar.gz
emacs-f2223371ed7a582d8eb65311322e59da20742f98.zip
* lisp/emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@
with more than one argument. Fixes: debbugs:15538
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/backquote.el11
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index db02ef7a67f..fd132cad1a2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12013-10-08 Stefan Monnier <monnier@iro.umontreal.ca> 12013-10-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@
4 with more than one argument (bug#15538).
5
3 * mpc.el (mpc-songs-jump-to): Adjust to different playlist format. 6 * mpc.el (mpc-songs-jump-to): Adjust to different playlist format.
4 7
5 * vc/pcvs.el: Use lexical-binding. 8 * 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:
153 (list 'quote s)))) 153 (list 'quote s))))
154 ((eq (car s) backquote-unquote-symbol) 154 ((eq (car s) backquote-unquote-symbol)
155 (if (<= level 0) 155 (if (<= level 0)
156 (cons 1 (nth 1 s)) 156 (if (> (length s) 2)
157 ;; We could support it with: (cons 2 `(list . ,(cdr s)))
158 ;; But let's not encourage such uses.
159 (error "Multiple args to , are not supported: %S" s)
160 (cons 1 (nth 1 s)))
157 (backquote-delay-process s (1- level)))) 161 (backquote-delay-process s (1- level))))
158 ((eq (car s) backquote-splice-symbol) 162 ((eq (car s) backquote-splice-symbol)
159 (if (<= level 0) 163 (if (<= level 0)
160 (cons 2 (nth 1 s)) 164 (if (> (length s) 2)
165 ;; (cons 2 `(append . ,(cdr s)))
166 (error "Multiple args to ,@ are not supported: %S" s)
167 (cons 2 (nth 1 s)))
161 (backquote-delay-process s (1- level)))) 168 (backquote-delay-process s (1- level))))
162 ((eq (car s) backquote-backquote-symbol) 169 ((eq (car s) backquote-backquote-symbol)
163 (backquote-delay-process s (1+ level))) 170 (backquote-delay-process s (1+ level)))