mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
elisp `while' macro
* module/language/elisp/compile-tree-il.scm (compile-while): Remove. * module/language/elisp/boot.el (while): New macro. * module/language/elisp/runtime/function-slot.scm: Update module definition.
This commit is contained in:
parent
1c2f9636dc
commit
9b90b45398
3 changed files with 8 additions and 50 deletions
|
@ -90,6 +90,14 @@
|
|||
,temp
|
||||
(or ,@(cdr conditions))))))))
|
||||
|
||||
(defmacro while (test &rest body)
|
||||
(let ((loop (make-symbol "loop")))
|
||||
`(labels ((,loop ()
|
||||
(if ,test
|
||||
(progn ,@body (,loop))
|
||||
nil)))
|
||||
(,loop))))
|
||||
|
||||
(defmacro catch (tag &rest body)
|
||||
(let* ((temp (make-symbol "catch-temp"))
|
||||
(elisp-key (make-symbol "catch-elisp-key"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue