1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-11 16:20:19 +02:00
guile/module/language/elisp/runtime/function-slot.scm
Brian Templeton c55a2ddc1b store macro definitions in the function slot
Guile Emacs Lisp previously kept macros in a separate macro slot; now
macros are stored as macro objects in the function slot for
compatibility with other implementations.

* module/language/elisp/compile-tree-il.scm (macro-slot): Remove.
  (is-macro?): Check that the argument is a symbol. Now-unnecessary
  check removed in `compile-tree-il'.
  (macro?, define-macro!, get-macro): Store macro definitions in the
  function slot, not in a separate macro slot.
* module/language/elisp/runtime.scm (built-in-macro): Wrap the macro
  function in a macro object (i.e., cons the symbol `macro' onto it).
* module/language/elisp/runtime/function-slot.scm: Move contents to
  "subrs.scm". Re-export function and macro definitions instead of
  defining functions directly in this module.
* module/language/elisp/runtime/macro-slot.scm: Move contents to
  "macros.scm" and remove.
* module/language/elisp/runtime/macros.scm: New file containing macro
  definitions from "macro-slot.scm".
* module/language/elisp/runtime/subrs.scm: New file containing function
  definitions from "function-slot.scm".
2010-08-13 16:35:51 -04:00

99 lines
2.5 KiB
Scheme

;;; Guile Emacs Lisp
;;; Copyright (C) 2010 Free Software Foundation, Inc.
;;;
;;; This library is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU Lesser General Public License as
;;; published by the Free Software Foundation; either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; This library is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; Lesser General Public License for more details.
;;;
;;; You should have received a copy of the GNU Lesser General Public
;;; License along with this library; if not, write to the Free Software
;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
;;; 02110-1301 USA
(define-module (language elisp runtime function-slot)
#:use-module (language elisp runtime subrs)
#:use-module (language elisp runtime macros)
#:duplicates (last)
;; functions
#:re-export (eq
equal
floatp
integerp
numberp
wholenump
zerop
=
/=
<
<=
>
>=
max
min
abs
float
1+
1-
+
-
*
%
ffloor
fceiling
ftruncate
fround
consp
atomp
listp
nlistp
null
car
cdr
car-safe
cdr-safe
nth
nthcdr
length
cons
list
make-list
append
reverse
copy-tree
number-sequence
setcar
setcdr
symbol-value
symbol-function
set
fset
makunbound
fmakunbound
boundp
fboundp
apply
funcall
throw
not
eval)
;; macros
#:re-export (prog1
prog2
when
unless
cond
and
or
dotimes
dolist
catch
unwind-protect
pop
push))