comparison lisp/very-early-lisp.el @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 8429d81ab209
children 8626e4521993
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
32 32
33 ;;; Code: 33 ;;; Code:
34 34
35 (define-function 'defalias 'define-function) 35 (define-function 'defalias 'define-function)
36 36
37 ;;; Intended replacement for read-time Lisp reader macros #-, #+ 37 ;;; Macros from Michael Sperber to replace read-time Lisp reader macros #-, #+
38 38 ;;; ####fixme duplicated in make-docfile.el and update-elc.el
39 (defmacro assemble-list (&rest components) 39 (defmacro assemble-list (&rest components)
40 "Assemble a list from COMPONENTS. 40 "Assemble a list from COMPONENTS.
41 This is a poor man's backquote: 41 This is a poor man's backquote:
42 COMPONENTS is a list, each element of which is macro-expanded. 42 COMPONENTS is a list, each element of which is macro-expanded.
43 Each macro-expanded element either has the form (SPLICE stuff), 43 Each macro-expanded element either has the form (SPLICE stuff),
55 55
56 (defmacro when-feature (feature stuff) 56 (defmacro when-feature (feature stuff)
57 "Insert STUFF as a list element if FEATURE is a loaded feature. 57 "Insert STUFF as a list element if FEATURE is a loaded feature.
58 This is intended for use as a component of ASSEMBLE-LIST." 58 This is intended for use as a component of ASSEMBLE-LIST."
59 (list 'splice 59 (list 'splice
60 (list 'if (list 'featurep (list 'quote feature)) 60 (if (featurep feature)
61 (list 'list stuff) 61 (list 'list stuff)
62 '()))) 62 '())))
63 63
64 (defmacro unless-feature (feature stuff) 64 (defmacro unless-feature (feature stuff)
65 "Insert STUFF as a list element if FEATURE is NOT a loaded feature. 65 "Insert STUFF as a list element if FEATURE is NOT a loaded feature.
66 This is intended for use as a component of ASSEMBLE-LIST." 66 This is intended for use as a component of ASSEMBLE-LIST."
67 (list 'splice 67 (list 'splice
68 (list 'if (list 'featurep (list 'quote feature)) 68 (if (featurep feature)
69 '() 69 '()
70 (list 'list stuff)))) 70 (list 'list stuff))))
71 71
72 (provide 'very-early-lisp) 72 (provide 'very-early-lisp)
73 73
74 ;;; very-early-lisp.el ends here 74 ;;; very-early-lisp.el ends here