Skip to content

Commit

Permalink
0.8.11.3:
Browse files Browse the repository at this point in the history
	Fix backquote pretty-printing bug (reported by Brian Downing
	sbcl-devel 2004-06-06)
	... don't destroy list structure in the process of printing!
  • Loading branch information
csrhodes committed Jun 8, 2004
1 parent 1a68f34 commit d3b83f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -2524,6 +2524,8 @@ changes in sbcl-0.8.12 relative to sbcl-0.8.11:
string for information on the protocol.
* fixed bug 335: ATANH now computes the inverse hyperbolic tangent
even for difficult arguments. (reported by Peter Graves)
* fixed a bug in backquote printing: no more modification of the
form's list structure. (reported by Brian Downing)

planned incompatible changes in 0.8.x:
* (not done yet, but planned:) When the profiling interface settles
Expand Down
8 changes: 4 additions & 4 deletions src/code/pp-backq.lisp
Expand Up @@ -35,8 +35,8 @@
((atom form)
(backq-unparse-expr form splicing))
((not (null (cdr (last form))))
;; FIXME: Shouldn't this be an ERROR?
"### illegal dotted backquote form ###")
;; FIXME: this probably throws a recursive error
(bug "found illegal dotted backquote form: ~S" form))
(t
(case (car form)
(backq-list
Expand All @@ -49,10 +49,10 @@
(backq-unparse (car tail) t)))
(push (backq-unparse (car tail)) accum)))
(backq-append
(mapcan (lambda (el) (backq-unparse el t))
(mapcar (lambda (el) (backq-unparse el t))
(cdr form)))
(backq-nconc
(mapcan (lambda (el) (backq-unparse el :nconc))
(mapcar (lambda (el) (backq-unparse el :nconc))
(cdr form)))
(backq-cons
(cons (backq-unparse (cadr form) nil)
Expand Down
3 changes: 3 additions & 0 deletions tests/backq.impure.lisp
Expand Up @@ -55,5 +55,8 @@
(test-double-backquote (car test) (cdr test)))
*backquote-tests*)

(let ((string "`(foobar a b ,c ,'(e f g) d ,@'(e f g) (h i j) ,@foo)"))
(assert (equal (print (read-from-string string)) (read-from-string string))))

;;; success
(quit :unix-status 104)
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.8.11.2"
"0.8.11.3"

0 comments on commit d3b83f6

Please sign in to comment.