aboutsummaryrefslogtreecommitdiff
path: root/src/property.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-17 19:11:24 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-18 09:55:57 -0700
commit2403f5c0a09915cd1100159953fa8430f0417ced (patch)
treee9a89e2352f8e9ee595100006105bc8860d97e86 /src/property.lisp
parent2ec53b9d3e0ca7eadab33ceba03ffa8b55e3f26e (diff)
downloadconsfigurator-2403f5c0a09915cd1100159953fa8430f0417ced.tar.gz
record which symbols are properties at compile time
This is for the sake of PROPS. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property.lisp')
-rw-r--r--src/property.lisp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/property.lisp b/src/property.lisp
index d8c1493..04d3780 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -47,11 +47,10 @@
(setf (get sym 'papply) apply))
(when unapply
(setf (get sym 'unapply) unapply))
- (setf (get sym 'property) t)
sym)
(defun isprop (prop)
- (and (symbolp prop) (get prop 'property nil)))
+ (and (symbolp prop) (get prop 'isprop nil)))
(defun proptype (prop)
(get prop 'ptype))
@@ -110,6 +109,7 @@ This variable exists just to avoid consing these forms over and over again;
see MAP-PROPSPEC-PROPAPPS for how they are used.")
(defun record-known-property (psym)
+ (setf (get psym 'isprop) t)
(push psym *known-properties*)
(push `(,psym (&rest args)
(let ((gensym (gensym)))
@@ -222,7 +222,8 @@ parsing FORMSV and pushing SETPROP keyword argument pairs to plist SLOTSV."
(let ((indent (cadr (assoc 'indent (cdar ,declarations)))))
,@mforms
`(progn
- (record-known-property ',,name)
+ (eval-when (:compile-toplevel :load-toplevel :execute)
+ (record-known-property ',,name))
(store-indentation-info-for-emacs ',,name ',,lambdav ,indent)
(setprop ',,name ,@,slotsv)
;; TODO Ideally we would use ,(ordinary-ll-without-&aux