0.6.7.18: FINISH-OUTPUT is now called more consistently on QUIT.
authorWilliam Harold Newman <william.newman@airmail.net>
Fri, 20 Oct 2000 15:57:51 +0000 (15:57 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Fri, 20 Oct 2000 15:57:51 +0000 (15:57 +0000)
BUGS
NEWS
src/code/cold-init.lisp
src/code/save.lisp
src/code/toplevel.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index f9d65a1..c20e522 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -742,10 +742,4 @@ Error in function C::GET-LAMBDA-TO-COMPILE:
   unrelated infinite-regress-errors problems, many related to 
   revised signal handling, which were fixed around the same time.
 
-* Even when FINISH-OUTPUT is called, the system doesn't in general
-  flush the last line of output unless it's terminated by a newline.
-  (This is particularly annoying because several Lisp functions like
-  PRINT *precede* their output with a newline, instead of following
-  it with a newline.)
-
 * (SUBTYPEP '(AND ZILCH INTEGER) 'ZILCH) => NIL, NIL
\ No newline at end of file
diff --git a/NEWS b/NEWS
index 262766d..ff049ff 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -497,12 +497,11 @@ changes in sbcl-0.6.8 relative to sbcl-0.6.7:
   to Martin Atzmueller's review of it.
 * The debugger now flushes standard output streams before it begins
   its output ("debugger invoked" and so forth).
-?? The core version number and fasl file version number have both
+* The core version number and fasl file version number have both
   been incremented, because of incompatible changes in the layout
   of static symbols.
-?? FINISH-OUTPUT now works better than it did before. (It used to 
-  have trouble with characters which weren't followed by a linefeed.)
-  ?? Remember to remove this from BUGS.
+* FINISH-OUTPUT is now called more consistently on QUIT. (It
+  used to not be called for a saved Lisp image.)
 ?? The patch for the SUBSEQ bug reported on the cmucl-imp mailing
   list 12 September 2000 has been applied to SBCL.
 ?? Martin Atzmueller's versions of two CMU CL patches, as posted on 
index f01cb59..4bc3375 100644 (file)
   ;; The show is on.
   (terpri)
   (/show0 "going into toplevel loop")
-  (let ((wot (catch '%end-of-the-world
-              (/show0 "inside CATCH '%END-OF-THE-WORLD")
-              (toplevel))))
-    (flush-standard-output-streams)
-    (sb!unix:unix-exit wot)))
+  (handling-end-of-the-world 
+    (toplevel)))
 
 (defun quit (&key recklessly-p
                  (unix-code 0 unix-code-p)
index b61733d..ad79a4d 100644 (file)
   (dolist (f *before-save-initializations*)
     (funcall f))
   (flet ((restart-lisp ()
-          (sb!unix:unix-exit
-           (catch '%end-of-the-world
-             (reinit)
-             ;; FIXME: Wouldn't it be more correct to do this running
-             ;; backwards through the list, instead of forwards?
-             (dolist (f *after-save-initializations*)
-               (funcall f))
-             (funcall toplevel)))))
+           (handling-end-of-the-world
+            (reinit)
+            (dolist (f *after-save-initializations*)
+              (funcall f))
+            (funcall toplevel))))
     ;; FIXME: Perhaps WITHOUT-GCING should be wrapped around the
     ;; LET as well, to avoid the off chance of an interrupt triggering
     ;; GC and making our saved RESTART-LISP address invalid?
index 583ef95..0b5dce9 100644 (file)
 (defvar *maximum-error-depth*)
 (defvar *current-error-depth*)
 \f
+;;;; miscellaneous utilities for working with with TOPLEVEL
+
+;;; Execute BODY in a context where any %END-OF-THE-WORLD (thrown e.g.
+;;; by QUIT) is caught and any final processing and return codes are
+;;; handled appropriately.
+(defmacro handling-end-of-the-world (&body body)
+  (let ((caught (gensym "CAUGHT")))
+    `(let ((,caught (catch '%end-of-the-world
+                     (/show0 "inside CATCH '%END-OF-THE-WORLD")
+                     ,@body)))
+       (/show0 "back from CATCH '%END-OF-THE-WORLD, flushing output")
+       (flush-standard-output-streams)
+       (/show0 "calling UNIX-EXIT")
+       (sb!unix:unix-exit ,caught))))
+\f
 ;;;; working with *CURRENT-ERROR-DEPTH* and *MAXIMUM-ERROR-DEPTH*
 
 ;;; INFINITE-ERROR-PROTECT is used by ERROR and friends to keep us out of
index ad58f3e..9d15931 100644 (file)
@@ -15,4 +15,4 @@
 ;;; versions, and a string a la "0.6.5.12" is used for versions which
 ;;; aren't released but correspond only to CVS tags or snapshots.
 
-"0.6.7.17"
+"0.6.7.18"