git.fiddlerwoaroof.com
Browse code

misc changes

Ed L authored on 07/10/2017 20:35:53
Showing 1 changed files
... ...
@@ -193,6 +193,14 @@
193 193
   (cons (make-keyword (string-upcase k)) v))
194 194
 
195 195
 (defmacro default-when (default test &body body)
196
+  "return the default unless the test is true"
197
+  (warn "default-when is deprecated, renamed to default-unless")
198
+  (once-only (default)
199
+    `(or (when ,test
200
+           ,@body)
201
+         ,default)))
202
+
203
+(defmacro default-unless (default test &body body)
196 204
   "return the default unless the test is true"
197 205
   (once-only (default)
198 206
     `(or (when ,test