comparison lisp/very-early-lisp.el @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents 8626e4521993
children 697ef44129c6
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
1 ;;; very-early-lisp.el --- Lisp support always needed by temacs 1 ;;; very-early-lisp.el --- Lisp support always needed by temacs
2 2
3 ;; Copyright (C) 1998 by Free Software Foundation, Inc. 3 ;; Copyright (C) 1998 by Free Software Foundation, Inc.
4 4
5 ;; Author: SL Baur <steve@altair.xemacs.org> 5 ;; Author: SL Baur <steve@xemacs.org>
6 ;; Michael Sperber [Mr. Preprocessor] <sperber@Informatik.Uni-Tuebingen.De> 6 ;; Michael Sperber [Mr. Preprocessor] <sperber@Informatik.Uni-Tuebingen.De>
7 ;; Keywords: internal, dumped 7 ;; Keywords: internal, dumped
8 8
9 ;; This file is part of XEmacs. 9 ;; This file is part of XEmacs.
10 10
30 ;; This file must be loaded by temacs if temacs is to process bytecode 30 ;; This file must be loaded by temacs if temacs is to process bytecode
31 ;; or dumped-lisp.el files. 31 ;; or dumped-lisp.el files.
32 32
33 ;;; Code: 33 ;;; Code:
34 34
35 ;;; Macros from Michael Sperber to replace read-time Lisp reader macros #-, #+ 35 ;;; Intended replacement for read-time Lisp reader macros #-, #+
36 ;;; ####fixme duplicated in make-docfile.el and update-elc.el 36
37 (defmacro assemble-list (&rest components) 37 (defmacro assemble-list (&rest components)
38 "Assemble a list from COMPONENTS. 38 "Assemble a list from COMPONENTS.
39 This is a poor man's backquote: 39 This is a poor man's backquote:
40 COMPONENTS is a list, each element of which is macro-expanded. 40 COMPONENTS is a list, each element of which is macro-expanded.
41 Each macro-expanded element either has the form (SPLICE stuff), 41 Each macro-expanded element either has the form (SPLICE stuff),
53 53
54 (defmacro when-feature (feature stuff) 54 (defmacro when-feature (feature stuff)
55 "Insert STUFF as a list element if FEATURE is a loaded feature. 55 "Insert STUFF as a list element if FEATURE is a loaded feature.
56 This is intended for use as a component of ASSEMBLE-LIST." 56 This is intended for use as a component of ASSEMBLE-LIST."
57 (list 'splice 57 (list 'splice
58 (if (featurep feature) 58 (list 'if (list 'featurep (list 'quote feature))
59 (list 'list stuff) 59 (list 'list stuff)
60 '()))) 60 '())))
61 61
62 (defmacro unless-feature (feature stuff) 62 (defmacro unless-feature (feature stuff)
63 "Insert STUFF as a list element if FEATURE is NOT a loaded feature. 63 "Insert STUFF as a list element if FEATURE is NOT a loaded feature.
64 This is intended for use as a component of ASSEMBLE-LIST." 64 This is intended for use as a component of ASSEMBLE-LIST."
65 (list 'splice 65 (list 'splice
66 (if (featurep feature) 66 (list 'if (list 'featurep (list 'quote feature))
67 '() 67 '()
68 (list 'list stuff)))) 68 (list 'list stuff))))
69 69
70 (provide 'very-early-lisp) 70 (provide 'very-early-lisp)
71 71
72 ;;; very-early-lisp.el ends here 72 ;;; very-early-lisp.el ends here