Mercurial > emacs
comparison lisp/emacs-lisp/backquote.el @ 807:4f28bd14272c
*** empty log message ***
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Thu, 16 Jul 1992 21:47:34 +0000 |
parents | 8a533acedb77 |
children | e694e0879463 |
comparison
equal
deleted
inserted
replaced
806:d42e1151eed8 | 807:4f28bd14272c |
---|---|
1 ;; backquote.el --- backquoting for Emacs Lisp macros | 1 ;; backquote.el --- backquoting for Emacs Lisp macros |
2 | 2 |
3 ;; Author: Dick King (king@kestrel). | |
4 ;; Last-Modified: 16 Mar 1992 | |
5 | |
3 ;; Copyright (C) 1985 Free Software Foundation, Inc. | 6 ;; Copyright (C) 1985 Free Software Foundation, Inc. |
4 ;; Written by Dick King (king@kestrel). | |
5 | 7 |
6 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
7 | 9 |
8 ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 ;; GNU Emacs is free software; you can redistribute it and/or modify |
9 ;; it under the terms of the GNU General Public License as published by | 11 ;; it under the terms of the GNU General Public License as published by |
10 ;; the Free Software Foundation; either version 1, or (at your option) | 12 ;; the Free Software Foundation; either version 2, or (at your option) |
11 ;; any later version. | 13 ;; any later version. |
12 | 14 |
13 ;; GNU Emacs is distributed in the hope that it will be useful, | 15 ;; GNU Emacs is distributed in the hope that it will be useful, |
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | 19 |
18 ;; You should have received a copy of the GNU General Public License | 20 ;; You should have received a copy of the GNU General Public License |
19 ;; 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 |
20 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | 23 |
22 | 24 ;;; Commentary: |
23 ;;; This is a rudimentry backquote package written by D. King, | 25 |
26 ;;; This is a rudimentry backquote package written by D. King, | |
24 ;;; king@kestrel, on 8/31/85. (` x) is a macro | 27 ;;; king@kestrel, on 8/31/85. (` x) is a macro |
25 ;;; that expands to a form that produces x. (` (a b ..)) is | 28 ;;; that expands to a form that produces x. (` (a b ..)) is |
26 ;;; 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 |
27 ;;; etc. would have produced. Any element can be of the form | 30 ;;; etc. would have produced. Any element can be of the form |
28 ;;; (, <form>) in which case the resulting form evaluates | 31 ;;; (, <form>) in which case the resulting form evaluates |
56 ;;; inclusion of (,atom) rather than (, atom) or (,@atom) rather than | 59 ;;; inclusion of (,atom) rather than (, atom) or (,@atom) rather than |
57 ;;; (,@ atom) will result in errors that will show up very late. | 60 ;;; (,@ atom) will result in errors that will show up very late. |
58 ;;; This is so crunchy that I am considering including a check for | 61 ;;; This is so crunchy that I am considering including a check for |
59 ;;; this or changing the syntax to ... ,(<form>). RMS: opinion? | 62 ;;; this or changing the syntax to ... ,(<form>). RMS: opinion? |
60 | 63 |
64 ;;; Code: | |
61 | 65 |
62 ;;; a raft of general-purpose macros follows. See the nearest | 66 ;;; a raft of general-purpose macros follows. See the nearest |
63 ;;; Commonlisp manual. | 67 ;;; Commonlisp manual. |
64 (defmacro bq-push (v l) | 68 (defmacro bq-push (v l) |
65 "Pushes evaluated first form onto second unevaluated object | 69 "Pushes evaluated first form onto second unevaluated object |