summaryrefslogtreecommitdiff
path: root/module/language/elisp/boot.el
diff options
context:
space:
mode:
Diffstat (limited to 'module/language/elisp/boot.el')
-rw-r--r--module/language/elisp/boot.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/language/elisp/boot.el b/module/language/elisp/boot.el
index bef4c1d7c..fe9af290f 100644
--- a/module/language/elisp/boot.el
+++ b/module/language/elisp/boot.el
@@ -41,6 +41,18 @@
(eval-when-compile ,@body)
(progn ,@body)))
+(defmacro %define-compiler-macro (name args &rest body)
+ `(eval-and-compile
+ (%funcall
+ (@ (language elisp runtime) set-symbol-plist!)
+ ',name
+ (%funcall
+ (@ (guile) cons*)
+ '%compiler-macro
+ #'(lambda ,args ,@body)
+ (%funcall (@ (language elisp runtime) symbol-plist) ',name)))
+ ',name))
+
(eval-and-compile
(defun eval (form)
(%funcall (@ (language elisp runtime) eval-elisp) form)))