summaryrefslogtreecommitdiff
path: root/hyperquirks.lisp
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-08-08 16:37:53 -0500
committerColin Okay <okay@toyful.space>2022-08-08 16:37:53 -0500
commita912e36ee33091a6d1c0047a738c9a94ba22ffc9 (patch)
treef9da9f6f03db7f42b377b5e56d37acd39a518b79 /hyperquirks.lisp
parente55b0b4b9ac4f57cd3f1b73be0ee078b8100ab9e (diff)
[refactor] defvarf
Diffstat (limited to 'hyperquirks.lisp')
-rw-r--r--hyperquirks.lisp6
1 files changed, 3 insertions, 3 deletions
diff --git a/hyperquirks.lisp b/hyperquirks.lisp
index 8f3a944..70ee560 100644
--- a/hyperquirks.lisp
+++ b/hyperquirks.lisp
@@ -5,9 +5,9 @@
;;; MACROS
(defmacro defvarf (var &optional val doc)
- `(progn
- (defvar ,var nil ,doc)
- (setf ,var ,val)))
+ `(if (boundp ',var)
+ (setf ,var ,val)
+ (defvar ,var ,val ,doc)))
(defmacro imperative (&body body)
"Evaluate expressins in BODY in sequence. Expressions that look