[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Thu Oct 23 21:28:12 UTC 2008
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv21389
Modified Files:
ChangeLog slime.el
Log Message:
* slime.el (slime-redirect-inferior-output): New command.
--- /project/slime/cvsroot/slime/ChangeLog 2008/10/21 20:38:05 1.1568
+++ /project/slime/cvsroot/slime/ChangeLog 2008/10/23 21:28:12 1.1569
@@ -1,3 +1,7 @@
+2008-10-23 Helmut Eller <heller at common-lisp.net>
+
+ * slime.el (slime-redirect-inferior-output): New command.
+
2008-10-21 Helmut Eller <heller at common-lisp.net>
* swank-allegro.lisp (frame-restartable-p): Handle errors signaled
--- /project/slime/cvsroot/slime/slime.el 2008/10/21 20:37:51 1.1051
+++ /project/slime/cvsroot/slime/slime.el 2008/10/23 21:28:12 1.1052
@@ -3816,6 +3816,25 @@
(switch-to-buffer buffer)
(goto-char (point-max))))
+(defun slime-redirect-inferior-output (&optional noerror)
+ "Redirect output of the inferior-process to the REPL buffer."
+ (interactive)
+ (let ((proc (slime-inferior-process)))
+ (cond (proc
+ (let ((filter (slime-rcurry #'slime-inferior-output-filter
+ (slime-current-connection))))
+ (set-process-filter proc filter)))
+ (noerror)
+ (t (error "No inferior lisp process")))))
+
+(defun slime-inferior-output-filter (proc string conn)
+ (cond ((eq (process-status conn) 'closed)
+ (message "Connection closed. Removing inferior output filter.")
+ (message "Lost output: %S" string)
+ (set-process-filter proc nil))
+ (t
+ (slime-output-filter conn string))))
+
;;;;; Cleanup after a quit
More information about the slime-cvs
mailing list