diff --git a/NEWS b/NEWS index e3abb058b..e5ee1952d 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/src/code/pp-backq.lisp b/src/code/pp-backq.lisp index 9c4c7c9f8..cfbb8fa9f 100644 --- a/src/code/pp-backq.lisp +++ b/src/code/pp-backq.lisp @@ -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 @@ -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) diff --git a/tests/backq.impure.lisp b/tests/backq.impure.lisp index a9be79beb..ffdeb93ea 100644 --- a/tests/backq.impure.lisp +++ b/tests/backq.impure.lisp @@ -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) diff --git a/version.lisp-expr b/version.lisp-expr index fc137e7c6..9f635460a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"