diff options
author | Colin Okay <okay@toyful.space> | 2022-08-08 16:37:53 -0500 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-08-08 16:37:53 -0500 |
commit | a912e36ee33091a6d1c0047a738c9a94ba22ffc9 (patch) | |
tree | f9da9f6f03db7f42b377b5e56d37acd39a518b79 | |
parent | e55b0b4b9ac4f57cd3f1b73be0ee078b8100ab9e (diff) |
[refactor] defvarf
-rw-r--r-- | hyperquirks.lisp | 6 |
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 |