0.8.4.7:
authorChristophe Rhodes <csr21@cam.ac.uk>
Fri, 3 Oct 2003 17:39:30 +0000 (17:39 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Fri, 3 Oct 2003 17:39:30 +0000 (17:39 +0000)
(Not Linux) build fix
... move reference to SIG_DEQUEUE into #ifdef LISP_FEATURE_SB_THREAD
Fix bug in backquote pretty-printer
... now takes care to disambiguate ,.foo and , .foo

BUGS
NEWS
src/code/pp-backq.lisp
src/runtime/thread.c
tests/pprint.impure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index 688b166..0185dc7 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -464,12 +464,6 @@ WORKAROUND:
     * '``(FOO ,@',@S)
     ``(FOO SB-IMPL::BACKQ-COMMA-AT S)
 
-  b.
-    * (write '`(, .ala.) :readably t :pretty t)
-    `(,.ALA.)
-
-  (note the space between the comma and the point)
-
 143:
   (reported by Jesse Bouwman 2001-10-24 through the unfortunately
   prominent SourceForge web/db bug tracking system, which is 
diff --git a/NEWS b/NEWS
index 9ab2e1f..68014ed 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2117,6 +2117,8 @@ changes in sbcl-0.8.5 relative to sbcl-0.8.4:
   * fix bug 214: algorithm for noting rejected templates is now more
     similar to that of template seletion. (also reported by rydis on
     #lisp)
+  * fixed bug 141b: printing backquoted information readably and prettily
+    inserts a space where necessary.
   * compiler enhancement: SIGNUM is now better able to derive the type
     of its result.
   * fixed some bugs revealed by Paul Dietz' test suite:
index 2552673..9b2ff78 100644 (file)
      (princ ",@" stream))
     (backq-comma-dot
      (princ ",." stream)))
-  (write (cadr form) :stream 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
+  ;; can do... -- CSR, 2003-09-30
+  (let ((output (with-output-to-string (s)
+                 (write (cadr form) :stream s))))
+    (unless (= (length output) 0)
+      (when (and (eql (car form) 'backq-comma)
+                (or (char= (char output 0) #\.)
+                    (char= (char output 0) #\@)))
+       (write-char #\Space stream))
+      (write-sequence output stream))))
 
 ;;; This is called by !PPRINT-COLD-INIT, fairly late, because
 ;;; SET-PPRINT-DISPATCH doesn't work until the compiler works.
index eb8f241..a42c26e 100644 (file)
@@ -263,6 +263,10 @@ struct thread *find_thread_by_pid(pid_t pid)
     return 0;
 }
 
+/* These are not needed unless #+SB-THREAD, and since sigwaitinfo()
+ * doesn't seem to be easily available everywhere (OpenBSD...) it's
+ * more trouble than it's worth to compile it when not needed. */
+#if defined LISP_FEATURE_SB_THREAD
 void block_sigcont(void)
 {
     /* don't allow ourselves to receive SIGCONT while we're in the
@@ -274,10 +278,6 @@ void block_sigcont(void)
     sigprocmask(SIG_BLOCK, &newset, 0); 
 }
 
-/* This is not needed unless #+SB-THREAD, and since sigwaitinfo()
- * doesn't seem to be easily available everywhere (OpenBSD...) it's
- * more trouble than it's worth to compile it when not needed. */
-#if defined LISP_FEATURE_SB_THREAD
 void unblock_sigcont_and_sleep(void)
 {
     sigset_t set;
index ee1f91a..8423f9f 100644 (file)
                               ;2~%~
                               ;3x"))))
 
+;;; bug 141b: not enough care taken to disambiguate ,.FOO and ,@FOO
+;;; from , .FOO and , @FOO
+(assert (equal
+        (with-output-to-string (s)
+          (write '`(,  .foo) :stream s :pretty t :readably t))
+        "`(, .FOO)"))
+(assert (equal
+        (with-output-to-string (s)
+          (write '`(,  @foo) :stream s :pretty t :readably t))
+        "`(, @FOO)"))
+(assert (equal
+        (with-output-to-string (s)
+          (write '`(,  ?foo) :stream s :pretty t :readably t))
+        "`(,?FOO)"))
 
 ;;; success
 (quit :unix-status 104)
index a04ff04..95b6ccb 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.4.6"
+"0.8.4.7"