mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
* module/language/elisp/boot.el (null, consp, listp, car, cdr) (make-symbol, signal): Use `%funcall' instead of `funcall' or `fset'. (symbolp, symbol-function, eval): Use `%funcall', since `funcall' now calls these functions. (functionp, %indirect-function): New functions. (funcall): Define in terms of `%funcall' and `%indirect-function'. (apply): New function. Previously defined in "module/language/elisp/runtime/subrs.scm". (fset): If `definition' is not a function, set the function cell of `symbol' to an falias for `definition'. * module/language/elisp/falias.scm: New file. * module/language/elisp/subrs.scm: Remove file. (apply): Remove. Now defined in "boot.el". * module/language/elisp/runtime/function-slot.scm: Update module definition. * module/Makefile.am: Update.
27 lines
722 B
Scheme
27 lines
722 B
Scheme
(define-module (language elisp falias)
|
|
#:export (falias?
|
|
make-falias
|
|
falias-function
|
|
falias-object))
|
|
|
|
(define <falias-vtable>
|
|
(make-struct <applicable-struct-vtable>
|
|
0
|
|
(make-struct-layout "pwpw")
|
|
(lambda (object port)
|
|
(format port "#<falias ~S>" (falias-object object)))))
|
|
|
|
(set-struct-vtable-name! <falias-vtable> 'falias)
|
|
|
|
(define (falias? object)
|
|
(and (struct? object)
|
|
(eq? (struct-vtable object) <falias-vtable>)))
|
|
|
|
(define (make-falias f object)
|
|
(make-struct <falias-vtable> 0 f object))
|
|
|
|
(define (falias-function object)
|
|
(struct-ref object 0))
|
|
|
|
(define (falias-object object)
|
|
(struct-ref object 1))
|