emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114570: * lisp/emacs-lisp/backquote.el (backquote-p


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r114570: * lisp/emacs-lisp/backquote.el (backquote-process): Catch uses of , and , @
Date: Tue, 08 Oct 2013 04:30:35 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114570
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15538
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2013-10-08 00:30:31 -0400
message:
  * lisp/emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@
  with more than one argument.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/backquote.el   
backquote.el-20091113204419-o5vbwnq5f7feedwu-190
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-08 03:48:01 +0000
+++ b/lisp/ChangeLog    2013-10-08 04:30:31 +0000
@@ -1,5 +1,8 @@
 2013-10-08  Stefan Monnier  <address@hidden>
 
+       * 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.

=== modified file 'lisp/emacs-lisp/backquote.el'
--- a/lisp/emacs-lisp/backquote.el      2013-01-01 09:11:05 +0000
+++ b/lisp/emacs-lisp/backquote.el      2013-10-08 04:30:31 +0000
@@ -153,11 +153,18 @@
              (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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]