[slime-cvs] CVS slime
trittweiler
trittweiler at common-lisp.net
Wed Aug 15 15:10:29 UTC 2007
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv21036
Modified Files:
slime.el
Log Message:
* slime.el (slime-process-available-input): Make sure that the
event received from SWANK is processed in the context of the
original buffer the request of the response was performed in.
Previously, the clauses of `slime-rex' were processed in the
internal *cl-connection* buffer. And as a result the continuations
passed to `slime-eval' and `slime-eval-async' ditto.
--- /project/slime/cvsroot/slime/slime.el 2007/08/15 13:45:43 1.796
+++ /project/slime/cvsroot/slime/slime.el 2007/08/15 15:10:29 1.797
@@ -2006,22 +2006,23 @@
(defun slime-process-available-input (process)
"Process all complete messages that have arrived from Lisp."
- (with-current-buffer (process-buffer process)
- (while (slime-net-have-input-p)
- (let ((event (condition-case error
- (slime-net-read)
- (error
- (slime-net-close process t)
- (error "net-read error: %S" error)))))
- (slime-log-event event)
- (let ((ok nil))
- (unwind-protect
- (save-current-buffer
- (slime-dispatch-event event process)
- (setq ok t))
- (unless ok
- (slime-run-when-idle
- 'slime-process-available-input process))))))))
+ (let ((original-buffer (current-buffer)))
+ (with-current-buffer (process-buffer process)
+ (while (slime-net-have-input-p)
+ (let ((event (condition-case error
+ (slime-net-read)
+ (error
+ (slime-net-close process t)
+ (error "net-read error: %S" error)))))
+ (slime-log-event event)
+ (let ((ok nil))
+ (unwind-protect
+ (with-current-buffer original-buffer
+ (slime-dispatch-event event process)
+ (setq ok t))
+ (unless ok
+ (slime-run-when-idle
+ 'slime-process-available-input process)))))))))
(defun slime-net-have-input-p ()
"Return true if a complete message is available."
More information about the slime-cvs
mailing list