1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 18:20:22 +02:00

new elisp special form `eval-when-compile'

* module/language/elisp/compile-tree-il.scm (compile-eval-when-compile):
  New function.
* module/language/elisp/runtime/function-slot.scm: Update module
  definition.
This commit is contained in:
BT Templeton 2011-06-20 17:08:56 -04:00
parent a338fa3d87
commit 80687f2e4b
2 changed files with 6 additions and 0 deletions

View file

@ -31,6 +31,7 @@
#:use-module (srfi srfi-26)
#:export (compile-tree-il
compile-progn
compile-eval-when-compile
compile-if
compile-defconst
compile-defvar
@ -632,6 +633,9 @@
(defspecial progn (loc args)
(make-sequence loc (map compile-expr args)))
(defspecial eval-when-compile (loc args)
(make-const loc (compile `(progn ,@args) #:from 'elisp #:to 'value)))
(defspecial if (loc args)
(pmatch args
((,cond ,then . ,else)