X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fearly-c.lisp;h=c748a0c481041bc8fd0a488aaf9cd85fed783d2f;hb=3bd7a97d1b11a2b0aee086ef211cae807f3dfc35;hp=022268910b49ab499569f4cc51d1be5589eed2ab;hpb=a1a2c079c7654defb618baad0dddcf0eaf2ce64f;p=sbcl.git diff --git a/src/compiler/early-c.lisp b/src/compiler/early-c.lisp index 0222689..c748a0c 100644 --- a/src/compiler/early-c.lisp +++ b/src/compiler/early-c.lisp @@ -116,7 +116,6 @@ ;;; to be called when a variable is lexically bound (declaim (ftype (function (symbol) (values)) note-lexical-binding)) (defun note-lexical-binding (symbol) - (let ((name (symbol-name symbol))) ;; This check is intended to protect us from getting silently ;; burned when we define ;; foo.lisp: @@ -127,10 +126,9 @@ ;; (LET ((*FOO* X)) ;; (FOO 14))) ;; and then we happen to compile bar.lisp before foo.lisp. - (when (and (char= #\* (aref name 0)) - (char= #\* (aref name (1- (length name))))) + (when (looks-like-name-of-special-var-p symbol) ;; FIXME: should be COMPILER-STYLE-WARNING? (style-warn "using the lexical binding of the symbol ~S, not the~@ dynamic binding, even though the symbol name follows the usual naming~@ -convention (names like *FOO*) for special variables" symbol))) +convention (names like *FOO*) for special variables" symbol)) (values))