summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-11 15:30:14 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-11 15:30:14 +0200
commit46582103dcaebac7d095d721a1fcbb9682118b08 (patch)
treeb95c742d7f8ac4bb0553c2c3af5506fd2a165058
parent2b1cd52fd85ebea924717a8d758288577970237a (diff)
PREPARE-REF: Support special variables.
-rw-r--r--sb-eval2.lisp8
1 files changed, 6 insertions, 2 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp
index 763b3fc..6301be9 100644
--- a/sb-eval2.lisp
+++ b/sb-eval2.lisp
@@ -93,8 +93,12 @@
new-context))
(defun prepare-ref (var context)
- (declare (ignore context))
- (lambda (env) (cdr (assoc var (environment-variables env) :test #'eq))))
+ (if (context-var-lexical-p context var)
+ (lambda (env)
+ (cdr (assoc var (environment-variables env) :test #'eq)))
+ (lambda (env)
+ (declare (ignore env))
+ (symbol-value var))))
(defun prepare-function-ref (f context)
(declare (ignore context))