mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +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:
parent
a338fa3d87
commit
80687f2e4b
2 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#:use-module ((language elisp compile-tree-il)
|
||||
#:select
|
||||
((compile-progn . progn)
|
||||
(compile-eval-when-compile . eval-when-compile)
|
||||
(compile-if . if)
|
||||
(compile-defconst . defconst)
|
||||
(compile-defvar . defvar)
|
||||
|
@ -54,6 +55,7 @@
|
|||
#:duplicates (last)
|
||||
;; special operators
|
||||
#:re-export (progn
|
||||
eval-when-compile
|
||||
if
|
||||
defconst
|
||||
defvar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue