[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Thu May 28 16:57:01 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv14882

Modified Files:
	slime.el ChangeLog 
Log Message:
	* slime.el (slime-dispatch-event :emacs-rex): Make sure that we
	pop the continuation on erroneous send.

	Patch by Mark Cox <markcox80 at gmail.com>.


--- /project/slime/cvsroot/slime/slime.el	2009/05/28 15:38:11	1.1181
+++ /project/slime/cvsroot/slime/slime.el	2009/05/28 16:56:59	1.1182
@@ -2375,10 +2375,18 @@
           ((:emacs-rex form package thread continuation)
            (when (and (slime-use-sigint-for-interrupt) (slime-busy-p))
              (slime-display-oneliner "; pipelined request... %S" form))
-           (let ((id (incf (slime-continuation-counter))))
+           (let ((id (incf (slime-continuation-counter)))
+                 (send-ok nil))
              (push (cons id continuation) (slime-rex-continuations))
-             (slime-send `(:emacs-rex ,form ,package ,thread ,id))
-             (slime-recompute-modelines t)))
+             (unwind-protect 
+                  (progn 
+                    (slime-send `(:emacs-rex ,form ,package ,thread ,id))
+                    (setq send-ok t))
+               (unless send-ok
+                 (setf (slime-rex-continuations)
+                       (cdr (slime-rex-continuations)))
+                 (funcall continuation '(:abort)))
+               (slime-recompute-modelines t))))
           ((:return value id)
            (let ((rec (assq id (slime-rex-continuations))))
              (cond (rec (setf (slime-rex-continuations)
@@ -2403,6 +2411,7 @@
                                    (error "Invalid channel id: %S %S" id msg))
                                msg))
           ((:emacs-channel-send id msg)
+           ;; FIXME: Guard against errors like in :emacs-rex?
            (slime-send `(:emacs-channel-send ,id ,msg)))
           ((:read-from-minibuffer thread tag prompt initial-value)
            (slime-read-from-minibuffer-for-swank thread tag prompt initial-value))
--- /project/slime/cvsroot/slime/ChangeLog	2009/05/28 15:42:47	1.1774
+++ /project/slime/cvsroot/slime/ChangeLog	2009/05/28 16:57:00	1.1775
@@ -1,5 +1,12 @@
 2009-05-28  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* slime.el (slime-dispatch-event :emacs-rex): Make sure that we
+	pop the continuation on erroneous send.
+
+	Patch by Mark Cox <markcox80 at gmail.com>.
+
+2009-05-28  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	* swank.lisp (tokenize-symbol-thoroughly): Make it work correctly
 	on escaped symbols.
 





More information about the slime-cvs mailing list