Skip to content

Commit

Permalink
0.7.13.25:
Browse files Browse the repository at this point in the history
        Fixed bug reported by Rolf Wester on comp.lang.lisp:
        DEFPARAMETER and DEFVAR now always assign a dynamic variable.
  • Loading branch information
Alexey Dejneka committed Mar 12, 2003
1 parent d2241ed commit 3586bad
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -1601,6 +1601,8 @@ changes in sbcl-0.7.14 relative to sbcl-0.7.13:
on malformed property lists;
* fixed SXHASH, giving different results for NIL depending on type
declarations (SYMBOL or LIST). (thanks to Gerd Moellmann)
* fixed bug in DEFPARAMETER and DEFVAR: they could assign a lexical
variable. (found by Rolf Wester)

planned incompatible changes in 0.7.x:
* (not done yet, but planned:) When the profiling interface settles
Expand Down
4 changes: 2 additions & 2 deletions src/code/defboot.lisp
Expand Up @@ -228,7 +228,7 @@
(declaim (special ,var))
,@(when valp
`((unless (boundp ',var)
(setq ,var ,val))))
(set ',var ,val))))
,@(when docp
`((setf (fdocumentation ',var 'variable) ',doc )))
',var))
Expand All @@ -242,7 +242,7 @@
string for the parameter."
`(progn
(declaim (special ,var))
(setq ,var ,val)
(set ',var ,val)
,@(when docp
`((setf (fdocumentation ',var 'variable) ',doc)))
',var))
Expand Down
9 changes: 9 additions & 0 deletions tests/eval.impure.lisp
Expand Up @@ -97,6 +97,15 @@

(assert (constantp (find-class 'symbol)))
(assert (constantp #p""))

;;; DEFPARAMETER must assign a dynamic variable
(let ((var (gensym)))
(assert (equal (eval `(list (let ((,var 1))
(defparameter ,var 2)
,var)
,var))
'(1 2))))


;;; success
(sb-ext:quit :unix-status 104)
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -18,4 +18,4 @@
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)

"0.7.13.24"
"0.7.13.25"

0 comments on commit 3586bad

Please sign in to comment.