summaryrefslogtreecommitdiff
path: root/sb-eval2.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'sb-eval2.lisp')
-rw-r--r--sb-eval2.lisp12
1 files changed, 11 insertions, 1 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp
index 0e1e197..853ba02 100644
--- a/sb-eval2.lisp
+++ b/sb-eval2.lisp
@@ -1024,7 +1024,17 @@
(destructuring-bind (bindings &rest exprs) (rest form)
(with-parsed-body (body specials) exprs
(let ((bindings (mapcar (lambda (form)
- (cons (first form) (second form)))
+ (destructuring-bind (var macro-form) form
+ (when (or (globally-special-p var)
+ (member var specials))
+ (error 'sb-int:simple-program-error
+ :format-control "Attempt to bind a special variable with SYMBOL-MACROLET: ~S"
+ :format-arguments (list var)))
+ (when (constantp var)
+ (error 'sb-int:simple-program-error
+ :format-control "Attempt to bind a special variable with SYMBOL-MACROLET: ~S"
+ :format-arguments (list var)))
+ (cons var macro-form)))
bindings)))
(prepare-progn body
(context-add-specials