comparison lisp/very-early-lisp.el @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
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