Skip to content
Snippets Groups Projects
Commit 8f45c844 authored by pfdietz's avatar pfdietz
Browse files

Changed SPECIAL-OPERATOR-P.2 to allow non-standard special operator symbols,...

Changed SPECIAL-OPERATOR-P.2 to allow non-standard special operator symbols, as long as the have a MACRO-FUNCTION in the null lexical environment.  The spec is inconsistent on whether any such symbols can exist.
parent 719c0274
No related branches found
No related tags found
No related merge requests found
...@@ -1063,12 +1063,16 @@ ...@@ -1063,12 +1063,16 @@
nil) nil)
;;; None of the standard symbols except those in +special-operators+ ;;; None of the standard symbols except those in +special-operators+
;;; are special operators ;;; are special operators, unless they have a macro function
;;; (See the page for MACRO-FUNCTION)
(deftest special-operator-p.2 (deftest special-operator-p.2
(let ((p (find-package "CL"))) (let ((p (find-package "CL")))
(loop for name in *cl-symbol-names* (loop for name in *cl-symbol-names*
unless (or (member name +special-operators+ :test #'string=) unless (or (member name +special-operators+ :test #'string=)
(not (special-operator-p (find-symbol name p)))) (let ((sym (find-symbol name p)))
(or (not (special-operator-p sym))
(macro-function sym))))
collect name)) collect name))
nil) nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment