Mercurial > emacs
comparison lisp/emacs-lisp/backquote.el @ 83676:27d11c1d4e46
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 857-862)
- Update from CVS
- Merge from emacs--rel--22
- Update from CVS: lisp/emacs-lisp/avl-tree.el: New file.
* emacs--rel--22 (patch 97-100)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 246-247)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-38
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 27 Aug 2007 09:21:49 +0000 |
parents | a5611e4218bf |
children | 78ee6fae0e41 fb6683560bac b83d0dadb2a7 |
comparison
equal
deleted
inserted
replaced
83675:67601f702028 | 83676:27d11c1d4e46 |
---|---|
83 ;; A few advertised variables that control which symbols are used | 83 ;; A few advertised variables that control which symbols are used |
84 ;; to represent the backquote, unquote, and splice operations. | 84 ;; to represent the backquote, unquote, and splice operations. |
85 (defconst backquote-backquote-symbol '\` | 85 (defconst backquote-backquote-symbol '\` |
86 "Symbol used to represent a backquote or nested backquote.") | 86 "Symbol used to represent a backquote or nested backquote.") |
87 | 87 |
88 (defconst backquote-unquote-symbol ', | 88 (defconst backquote-unquote-symbol '\, |
89 "Symbol used to represent an unquote inside a backquote.") | 89 "Symbol used to represent an unquote inside a backquote.") |
90 | 90 |
91 (defconst backquote-splice-symbol ',@ | 91 (defconst backquote-splice-symbol '\,@ |
92 "Symbol used to represent a splice inside a backquote.") | 92 "Symbol used to represent a splice inside a backquote.") |
93 | 93 |
94 ;;;###autoload | 94 ;;;###autoload |
95 (defmacro backquote (arg) | 95 (defmacro backquote (arg) |
96 "Argument STRUCTURE describes a template to build. | 96 "Argument STRUCTURE describes a template to build. |
119 ;; The top-level backquote macro just discards the tag. | 119 ;; The top-level backquote macro just discards the tag. |
120 | 120 |
121 (defun backquote-delay-process (s level) | 121 (defun backquote-delay-process (s level) |
122 "Process a (un|back|splice)quote inside a backquote. | 122 "Process a (un|back|splice)quote inside a backquote. |
123 This simply recurses through the body." | 123 This simply recurses through the body." |
124 (let ((exp (backquote-listify (list (backquote-process (nth 1 s) level) | 124 (let ((exp (backquote-listify (list (cons 0 (list 'quote (car s)))) |
125 (cons 0 (list 'quote (car s)))) | 125 (backquote-process (cdr s) level)))) |
126 '(0)))) | |
127 (if (eq (car-safe exp) 'quote) | 126 (if (eq (car-safe exp) 'quote) |
128 (cons 0 (list 'quote s)) | 127 (cons 0 (list 'quote s)) |
129 (cons 1 exp)))) | 128 (cons 1 exp)))) |
130 | 129 |
131 (defun backquote-process (s &optional level) | 130 (defun backquote-process (s &optional level) |