summaryrefslogtreecommitdiff
path: root/def.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'def.lisp')
-rw-r--r--def.lisp15
1 files changed, 8 insertions, 7 deletions
diff --git a/def.lisp b/def.lisp
index 65fd695..055a30b 100644
--- a/def.lisp
+++ b/def.lisp
@@ -19,13 +19,14 @@ easily document uninitialized special variables."
reevaluated."
(assert (good-muffed-var-name-p name :muffer "+"))
(let ((newval (gensym "NEWVAL-")))
- `(let ((,newval ,value))
- (handler-bind ((error
- (lambda (&rest ignore)
- (declare (ignore ignore))
- (invoke-restart 'cl:continue))))
- (makunbound ',name))
- (defconstant ,name ,newval ,@(when doc (list doc))))))
+ `(eval-when (:compile-toplevel :load-toplevel :execute)
+ (let ((,newval ,value))
+ (handler-bind ((error
+ (lambda (&rest ignore)
+ (declare (ignore ignore))
+ (invoke-restart 'cl:continue))))
+ (makunbound ',name))
+ (defconstant ,name ,newval ,@(when doc (list doc)))))))
(defmacro class (name (&rest supers) &body slots-and-options)
"Define a class.