Mercurial > emacs
comparison lisp/emacs-lisp/backquote.el @ 3591:507f64624555
Apply typo patches from Paul Eggert.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 09 Jun 1993 11:59:12 +0000 |
parents | bd3c525fa6fc |
children | de6afd5ec418 |
comparison
equal
deleted
inserted
replaced
3590:d5f22061277d | 3591:507f64624555 |
---|---|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to |
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | 23 |
24 ;;; Commentary: | 24 ;;; Commentary: |
25 | 25 |
26 ;;; This is a rudimentry backquote package written by D. King, | 26 ;;; This is a rudimentary backquote package written by D. King, |
27 ;;; king@kestrel, on 8/31/85. (` x) is a macro | 27 ;;; king@kestrel, on 8/31/85. (` x) is a macro |
28 ;;; that expands to a form that produces x. (` (a b ..)) is | 28 ;;; that expands to a form that produces x. (` (a b ..)) is |
29 ;;; a macro that expands into a form that produces a list of what a b | 29 ;;; a macro that expands into a form that produces a list of what a b |
30 ;;; etc. would have produced. Any element can be of the form | 30 ;;; etc. would have produced. Any element can be of the form |
31 ;;; (, <form>) in which case the resulting form evaluates | 31 ;;; (, <form>) in which case the resulting form evaluates |
81 | 81 |
82 | 82 |
83 ;;; These two advertised variables control what characters are used to | 83 ;;; These two advertised variables control what characters are used to |
84 ;;; unquote things. I have included , and ,@ as the unquote and | 84 ;;; unquote things. I have included , and ,@ as the unquote and |
85 ;;; splice operators, respectively, to give users of MIT CADR machine | 85 ;;; splice operators, respectively, to give users of MIT CADR machine |
86 ;;; derivitive machines a warm, cosy feeling. | 86 ;;; derivative machines a warm, cosy feeling. |
87 | 87 |
88 (defconst backquote-unquote '(,) | 88 (defconst backquote-unquote '(,) |
89 "*A list of all objects that stimulate unquoting in `. Memq test.") | 89 "*A list of all objects that stimulate unquoting in `. Memq test.") |
90 | 90 |
91 | 91 |
179 ; (let ((ans (funcall a b))) (debug nil 'leave state tailmaker) | 179 ; (let ((ans (funcall a b))) (debug nil 'leave state tailmaker) |
180 ; ans)) | 180 ; ans)) |
181 | 181 |
182 ;;; Given a state/tailmaker pair that already knows how to make a | 182 ;;; Given a state/tailmaker pair that already knows how to make a |
183 ;;; partial tail of the desired form, this function knows how to add | 183 ;;; partial tail of the desired form, this function knows how to add |
184 ;;; yet another element to the burgening list. There are four cases; | 184 ;;; yet another element to the burgeoning list. There are four cases; |
185 ;;; the next item is an atom (which will certainly be quoted); a | 185 ;;; the next item is an atom (which will certainly be quoted); a |
186 ;;; (, xxx), which will be evaluated and put into the list at the top | 186 ;;; (, xxx), which will be evaluated and put into the list at the top |
187 ;;; level; a (,@ xxx), which will be evaluated and spliced in, or | 187 ;;; level; a (,@ xxx), which will be evaluated and spliced in, or |
188 ;;; some other list, in which case we first compute the form's maker, | 188 ;;; some other list, in which case we first compute the form's maker, |
189 ;;; and then we either launch into the quoted case if the maker's | 189 ;;; and then we either launch into the quoted case if the maker's |