aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/property.lisp7
-rw-r--r--src/propspec.lisp14
2 files changed, 11 insertions, 10 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
diff --git a/src/propspec.lisp b/src/propspec.lisp
index f295081..c51b7df 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -109,17 +109,17 @@ arguments to properties in propapps, but that should not be needed."
(error ()
(error 'invalid-or-ambiguous-propspec :propspec propspec)))))
;; Now we use a dummy macro expansion pass to find any symbols without
- ;; function definitions occurring in function call positions. These
- ;; could potentially be properties whose definitions have not been
- ;; loaded -- especially since we get called at compile time by PROPS --
- ;; and if so, we would return an incorrect result because the previous
- ;; step will not have identified all the propapps in the propspec. So
- ;; error out if we detect that situation.
+ ;; function or property definitions occurring in function call
+ ;; positions. These could potentially be properties whose definitions
+ ;; have not been loaded -- especially since we get called at compile
+ ;; time by PROPS -- and if so, we would return an incorrect result
+ ;; because the previous step will not have identified all the propapps
+ ;; in the propspec. So error out if we detect that situation.
(macrolet-and-expand
(loop for leaf in (delete-duplicates (flatten expanded))
if (and (symbolp leaf) (not (isprop leaf)))
collect `(,leaf (&rest args)
- (unless (fboundp ',leaf)
+ (unless (or (fboundp ',leaf) (isprop ',leaf))
(error 'ambiguous-propspec :name ',leaf))
;; return something which looks like an
;; ordinary function call to the code walker,