[slime-cvs] CVS update: slime/slime.el

Helmut Eller heller at common-lisp.net
Fri Dec 12 22:52:57 UTC 2003


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv5373

Modified Files:
	slime.el 
Log Message:
(slime-output-string): Insert asynchronous output before the prompt.

Date: Fri Dec 12 17:52:57 2003
Author: heller

Index: slime/slime.el
diff -u slime/slime.el:1.144 slime/slime.el:1.145
--- slime/slime.el:1.144	Fri Dec 12 06:11:37 2003
+++ slime/slime.el	Fri Dec 12 17:52:56 2003
@@ -1557,9 +1557,18 @@
 
 (defun slime-output-string (string)
   (with-current-buffer (slime-output-buffer)
-    (slime-mark-input-end)
-    (slime-with-output-at-eob
-     (insert string))))
+    (cond ((slime-idle-p) 
+           ;; asynchrounous output
+           (save-excursion
+             (goto-char slime-repl-prompt-start-mark)
+             (slime-insert-propertized
+              (list 'face 'slime-repl-output-face) 
+              string "\n")
+             (set-marker slime-repl-prompt-start-mark (point))))
+          (t
+           (slime-mark-input-end)
+           (slime-with-output-at-eob
+            (insert string))))))
 
 (defun slime-switch-to-output-buffer ()
   "Select the output buffer, preferably in a different window."
@@ -1630,7 +1639,6 @@
   ;; command.  slime-mark-input-end sets the input-end-mark to some
   ;; position before the end and triggers printing of the prompt.
   (with-current-buffer (slime-output-buffer)
-    (slime-flush-output)
     (unless (= (point-max) slime-repl-input-end-mark)
       (slime-mark-output-end)
       (slime-with-output-at-eob





More information about the slime-cvs mailing list