[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Tue Feb 17 09:03:42 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv8100
Modified Files:
ChangeLog slime.el swank.lisp
Log Message:
* swank.lisp (dispatch-event [:emacs-rex]): Reply a :invalid-rpc
message if the specified thread doesn't exist.
* slime.el (slime-dispatch-event): Handle :invalid-rpc.
(slime-init-connection-state): Bind slime-current-thread
to avoid problems with dead threads.
--- /project/slime/cvsroot/slime/ChangeLog 2009/02/14 17:01:52 1.1682
+++ /project/slime/cvsroot/slime/ChangeLog 2009/02/17 09:03:41 1.1683
@@ -1,3 +1,11 @@
+2009-02-17 Helmut Eller <heller at common-lisp.net>
+
+ * swank.lisp (dispatch-event [:emacs-rex]): Reply a :invalid-rpc
+ message if the specified thread doesn't exist.
+ * slime.el (slime-dispatch-event): Handle :invalid-rpc.
+ (slime-init-connection-state): Bind slime-current-thread
+ to avoid problems with dead threads.
+
2009-02-14 Tobias C. Rittweiler <tcr at freebits.de>
* slime.el (slime-reader-conditionals-regexp): New variable. Taken
--- /project/slime/cvsroot/slime/slime.el 2009/02/14 12:33:17 1.1123
+++ /project/slime/cvsroot/slime/slime.el 2009/02/17 09:03:41 1.1124
@@ -1989,8 +1989,9 @@
;; function may be called from a timer, and if we setup the REPL
;; from a timer then it mysteriously uses the wrong keymap for the
;; first command.
- (slime-eval-async '(swank:connection-info)
- (slime-curry #'slime-set-connection-info proc)))
+ (let ((slime-current-thread t))
+ (slime-eval-async '(swank:connection-info)
+ (slime-curry #'slime-set-connection-info proc))))
(defun slime-set-connection-info (connection info)
"Initialize CONNECTION with INFO received from Lisp."
@@ -2397,9 +2398,11 @@
(princ (format "Invalid protocol message:\n%s\n\n%S"
condition packet))
(goto-char (point-min)))
- (error "Invalid protocol message")))))
- ;; Canonicalized return value. See comment in `slime-eval-async'.
- :slime-dispatch-event)
+ (error "Invalid protocol message"))
+ ((:invalid-rpc id message)
+ (setf (slime-rex-continuations)
+ (remove* id (slime-rex-continuations) :key #'car))
+ (error "Invalid rpc: %s" message))))))
(defun slime-send (sexp)
"Send SEXP directly over the wire on the current connection."
--- /project/slime/cvsroot/slime/swank.lisp 2009/02/14 12:33:28 1.634
+++ /project/slime/cvsroot/slime/swank.lisp 2009/02/17 09:03:41 1.635
@@ -1151,8 +1151,14 @@
(destructure-case event
((:emacs-rex form package thread-id id)
(let ((thread (thread-for-evaluation thread-id)))
- (push thread *active-threads*)
- (send-event thread `(:emacs-rex ,form ,package ,id))))
+ (cond (thread
+ (push thread *active-threads*)
+ (send-event thread `(:emacs-rex ,form ,package ,id)))
+ (t
+ (encode-message
+ (list :invalid-rpc id
+ (format nil "Thread not found: ~s" thread-id))
+ (current-socket-io))))))
((:return thread &rest args)
(let ((tail (member thread *active-threads*)))
(setq *active-threads* (nconc (ldiff *active-threads* tail)
More information about the slime-cvs
mailing list