summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-20 18:19:04 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-20 18:19:04 +0200
commit9b96062b2eb355b6f6a6583391a6958d9da28bed (patch)
tree4775837b1e93442d151a60634a0525322448b19e
parent557ed57e3ad0eea24977f5ee951c89e87c13bb20 (diff)
Make variables shadow symbol macros.
-rw-r--r--sb-eval2.lisp9
1 files changed, 7 insertions, 2 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp
index 853ba02..1e16620 100644
--- a/sb-eval2.lisp
+++ b/sb-eval2.lisp
@@ -148,8 +148,13 @@
(and parent (context-find-go-tag parent go-tag)))))
(defun context-find-symbol-macro (context symmac)
(let ((parent (context-parent context)))
- (or (cdr (assoc (the symbol symmac) (context-symbol-macros context)))
- (and parent (context-find-symbol-macro parent symmac)))))
+ (and (not (member symmac
+ (context-lexicals context)
+ :test #'equal
+ :key #'lexical-name))
+ (not (member symmac (context-specials context) :test #'equal))
+ (or (cdr (assoc (the symbol symmac) (context-symbol-macros context)))
+ (and parent (context-find-symbol-macro parent symmac))))))
(defun context-find-macro (context mac)
(let ((parent (context-parent context)))
(and (not (member `(function ,mac)