store macro definitions in the function slot
authorBrian Templeton <bpt@hcoop.net>
Wed, 23 Jun 2010 23:31:33 +0000 (19:31 -0400)
committerAndy Wingo <wingo@pobox.com>
Tue, 7 Dec 2010 12:21:02 +0000 (13:21 +0100)
commit8295b7c4e5637d363649101fa5080f9d31b80c14
treefc8ebe40581b6ef733fb0d331a83d7f2e45fe2f4
parent6e9ebc9179af52e90402ddd0b7f10f3857a0d329
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".

Signed-off-by: Andy Wingo <wingo@pobox.com>
module/Makefile.am
module/language/elisp/compile-tree-il.scm
module/language/elisp/runtime.scm
module/language/elisp/runtime/function-slot.scm
module/language/elisp/runtime/macros.scm [moved from module/language/elisp/runtime/macro-slot.scm with 99% similarity]
module/language/elisp/runtime/subrs.scm [copied from module/language/elisp/runtime/function-slot.scm with 94% similarity]