1 ;;; very-early-lisp.el --- Lisp support always needed by temacs
3 ;; Copyright (C) 1998 by Free Software Foundation, Inc.
5 ;; Author: SL Baur <steve@xemacs.org>
6 ;; Michael Sperber [Mr. Preprocessor] <sperber@Informatik.Uni-Tuebingen.De>
7 ;; Keywords: internal, dumped
9 ;; This file is part of SXEmacs.
11 ;; SXEmacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
16 ;; SXEmacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
24 ;;; Synched up with: Not in FSF
28 ;; This file must be loaded by temacs if temacs is to process bytecode
29 ;; or dumped-lisp.el files.
33 ;;; Intended replacement for read-time Lisp reader macros #-, #+
35 (defmacro assemble-list (&rest components)
36 "Assemble a list from COMPONENTS.
37 This is a poor man's backquote:
38 COMPONENTS is a list, each element of which is macro-expanded.
39 Each macro-expanded element either has the form (SPLICE stuff),
40 in which case stuff must be a list which is spliced into the result.
41 Otherwise, the component becomes an element of the list."
44 (mapcar #'(lambda (component)
45 (let ((component (macroexpand-internal component)))
46 (if (and (consp component)
47 (eq 'splice (car component)))
49 (list 'list component))))
52 (defmacro when-feature (feature stuff)
53 "Insert STUFF as a list element if FEATURE is a loaded feature.
54 This is intended for use as a component of ASSEMBLE-LIST."
56 (list 'if (list 'featurep (list 'quote feature))
60 (defmacro unless-feature (feature stuff)
61 "Insert STUFF as a list element if FEATURE is NOT a loaded feature.
62 This is intended for use as a component of ASSEMBLE-LIST."
64 (list 'if (list 'featurep (list 'quote feature))
68 (provide 'very-early-lisp)
70 ;;; very-early-lisp.el ends here