]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/backquote.el
Make seq.el more extensible by using cl-defmethod
[gnu-emacs] / lisp / emacs-lisp / backquote.el
index 5cecbcd4335b88cee25191fae58680933a60d107..dc61e1561305b7be69565d2d5297142750350822 100644 (file)
@@ -1,6 +1,6 @@
 ;;; backquote.el --- implement the ` Lisp construct
 
-;; Copyright (C) 1990, 1992, 1994, 2001-2014 Free Software Foundation,
+;; Copyright (C) 1990, 1992, 1994, 2001-2015 Free Software Foundation,
 ;; Inc.
 
 ;; Author: Rick Sladkey <jrs@world.std.com>
@@ -99,9 +99,9 @@ places where expressions are evaluated and inserted or spliced in.
 For example:
 
 b              => (ba bb bc)           ; assume b has this value
-`(a b c)       => (a b c)              ; backquote acts like quote
-`(a ,b c)      => (a (ba bb bc) c)     ; insert the value of b
-`(a ,@b c)     => (a ba bb bc c)       ; splice in the value of b
+\\=`(a b c)       => (a b c)           ; backquote acts like quote
+\\=`(a ,b c)      => (a (ba bb bc) c)  ; insert the value of b
+\\=`(a ,@b c)     => (a ba bb bc c)    ; splice in the value of b
 
 Vectors work just like lists.  Nested backquotes are permitted."
   (cdr (backquote-process structure)))
@@ -120,9 +120,7 @@ Vectors work just like lists.  Nested backquotes are permitted."
 This simply recurses through the body."
   (let ((exp (backquote-listify (list (cons 0 (list 'quote (car s))))
                                 (backquote-process (cdr s) level))))
-    (if (eq (car-safe exp) 'quote)
-        (cons 0 (list 'quote s))
-      (cons 1 exp))))
+    (cons (if (eq (car-safe exp) 'quote) 0 1) exp)))
 
 (defun backquote-process (s &optional level)
   "Process the body of a backquote.