summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBT Templeton <bpt@hcoop.net>2012-03-07 20:05:16 -0500
committerBT Templeton <bpt@hcoop.net>2012-03-08 17:08:30 -0500
commitc0652730bcbb769c732fbc459f5852077fded5c6 (patch)
tree2e534cb03db16022deb856bf91530e00b0a9281b
parent12c00a0453bd877030509bba93cf6113dc4c468d (diff)
downloadguile-c0652730bcbb769c732fbc459f5852077fded5c6.tar.gz
elisp: when, unless
* module/language/elisp/boot.el (when, unless): New macros.
-rw-r--r--module/language/elisp/boot.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/language/elisp/boot.el b/module/language/elisp/boot.el
index 29c2e96d5..2abd26e38 100644
--- a/module/language/elisp/boot.el
+++ b/module/language/elisp/boot.el
@@ -131,6 +131,14 @@
#'(lambda () ,bodyform)
#'(lambda () ,@unwindforms)))
+(defmacro when (cond &rest body)
+ `(if ,cond
+ (progn ,@body)))
+
+(defmacro unless (cond &rest body)
+ `(when (not ,cond)
+ ,@body))
+
(defun symbolp (object)
(%funcall (@ (guile) symbol?) object))