1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
(Best-ability ChangeLog annotation added by Christine Lemmer-Webber.)

* module/language/elisp/boot.el (defsubst): New macro.
This commit is contained in:
Robin Templeton 2014-08-04 23:11:43 -04:00 committed by Christine Lemmer-Webber
parent 8dcb633909
commit cfbf37d917
No known key found for this signature in database
GPG key ID: 4BC025925FF8F4D3

View file

@ -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)))