mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-18 02:00:20 +02:00
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".
This commit is contained in:
parent
88698140c0
commit
c55a2ddc1b
5 changed files with 451 additions and 352 deletions
|
@ -113,7 +113,7 @@
|
|||
(define-syntax built-in-macro
|
||||
(syntax-rules ()
|
||||
((_ name value)
|
||||
(define-public name value))))
|
||||
(define-public name (cons 'macro value)))))
|
||||
|
||||
;;; Call a guile-primitive that may be rebound for elisp and thus needs
|
||||
;;; absolute addressing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue