]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/backquote.el
Rename 24.5 to 25.1
[gnu-emacs] / lisp / emacs-lisp / backquote.el
index bc3292085f3889a08681e971ef7e2b31197cd93d..a497acd637ef5e60691df5e1883fbf49b2039aa1 100644 (file)
@@ -1,11 +1,12 @@
 ;;; backquote.el --- implement the ` Lisp construct
 
-;; Copyright (C) 1990, 1992, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 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
 
 ;; This file is part of GNU Emacs.
 
@@ -152,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)))
@@ -240,5 +248,4 @@ LEVEL is only used internally and indicates the nesting level:
        tail))
      (t (cons 'list heads)))))
 
-;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a
 ;;; backquote.el ends here