1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

elisp: when, unless

* module/language/elisp/boot.el (when, unless): New macros.
This commit is contained in:
BT Templeton 2012-03-07 20:05:16 -05:00
parent 12c00a0453
commit c0652730bc

View file

@ -131,6 +131,14 @@
#'(lambda () ,bodyform) #'(lambda () ,bodyform)
#'(lambda () ,@unwindforms))) #'(lambda () ,@unwindforms)))
(defmacro when (cond &rest body)
`(if ,cond
(progn ,@body)))
(defmacro unless (cond &rest body)
`(when (not ,cond)
,@body))
(defun symbolp (object) (defun symbolp (object)
(%funcall (@ (guile) symbol?) object)) (%funcall (@ (guile) symbol?) object))