mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
defsubst
(Best-ability ChangeLog annotation added by Christine Lemmer-Webber.) * module/language/elisp/boot.el (defsubst): New macro.
This commit is contained in:
parent
8dcb633909
commit
cfbf37d917
1 changed files with 13 additions and 0 deletions
|
@ -53,6 +53,19 @@
|
||||||
(%funcall (@ (language elisp runtime) symbol-plist) ',name)))
|
(%funcall (@ (language elisp runtime) symbol-plist) ',name)))
|
||||||
',name))
|
',name))
|
||||||
|
|
||||||
|
(defmacro defsubst (name args &rest body)
|
||||||
|
`(progn
|
||||||
|
(defun ,name ,args ,@body)
|
||||||
|
(eval-and-compile
|
||||||
|
(%define-compiler-macro ,name (form)
|
||||||
|
(%funcall (@ (guile) cons*)
|
||||||
|
'%funcall
|
||||||
|
(%funcall
|
||||||
|
(@ (guile) list)
|
||||||
|
'function
|
||||||
|
(%funcall (@ (guile) cons*) 'lambda ',args ',body))
|
||||||
|
(%funcall (@ (guile) cdr) form))))))
|
||||||
|
|
||||||
(eval-and-compile
|
(eval-and-compile
|
||||||
(defun eval (form)
|
(defun eval (form)
|
||||||
(%funcall (@ (language elisp runtime) eval-elisp) form)))
|
(%funcall (@ (language elisp runtime) eval-elisp) form)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue