0.8.19.24:
authorJuho Snellman <jsnell@iki.fi>
Fri, 11 Feb 2005 12:09:44 +0000 (12:09 +0000)
committerJuho Snellman <jsnell@iki.fi>
Fri, 11 Feb 2005 12:09:44 +0000 (12:09 +0000)
        Fix ansi-test failures related to pretty-printing backquoted forms
        when *PRINT-CIRCLE* is true. Print the ",@" and ",." tokens with
        WRITE-STRING instead of PRINC to prevent circularity detection
        from applying to them.

NEWS
src/code/pp-backq.lisp
tests/backq.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index d105bd7..2c89306 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,8 @@ changes in sbcl-0.8.20 (0.9alpha.0?) relative to sbcl-0.8.19:
        syntax.
     ** WITH-INPUT-FROM-STRING should only update the index place on
        normal termination.
+    ** Pretty-printing backquoted forms when *PRINT-CIRCLE* is true
+       works more reliably.
 
 changes in sbcl-0.8.19 relative to sbcl-0.8.18:
   * new port: SBCL now works in native 64-bit mode on x86-64/Linux
index dc5d6ae..7905ce7 100644 (file)
@@ -83,9 +83,9 @@
     (backq-comma
      (write-char #\, stream))
     (backq-comma-at
-     (princ ",@" stream))
+     (write-string ",@" stream))
     (backq-comma-dot
-     (princ ",." stream)))
+     (write-string ",." stream)))
   ;; Ha!  an example of where the per-process specials for stream
   ;; attributes rather than per-stream actually makes life easier.
   ;; Since all of the attributes are shared in the dynamic state, we
index ffdeb93..65583f5 100644 (file)
 
 (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))))
+    
+(let ((a '`(1 ,@a ,@b ,.c ,.d)))
+  (let ((*print-circle* t))
+    (assert (equal (read-from-string (write-to-string a)) a))))
 
 ;;; success
 (quit :unix-status 104)
index c55cc11..140f453 100644 (file)
@@ -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.19.23"
+"0.8.19.24"