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

Luke Gorrie lgorrie at common-lisp.net
Wed Oct 29 16:54:31 UTC 2003


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

Modified Files:
      Tag: backhackattack-1
	slime.el ChangeLog 
Log Message:
(slime-interrupt, slime-quit): Only send the quit/interrupt message to
Lisp if it is in fact evaluating something for us. This fixes a
protocol bug reported by Paolo Amoroso.

Added (require 'pp).

Date: Wed Oct 29 11:54:31 2003
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.59.2.1 slime/slime.el:1.59.2.2
--- slime/slime.el:1.59.2.1	Sun Oct 26 23:04:56 2003
+++ slime/slime.el	Wed Oct 29 11:54:31 2003
@@ -55,6 +55,7 @@
 (require 'inf-lisp)
 (require 'cl)
 (require 'hyperspec)
+(require 'pp)
 (when (featurep 'xemacs)
   (require 'overlay))
 (unless (fboundp 'define-minor-mode)
@@ -271,6 +272,14 @@
       (insert ")")))
   (comint-send-input))
 
+(defun inferior-slime-delete-char (arg)
+  "Delete ARG characters, or invoke ABORT restart if at end of buffer."
+  (interactive "p")
+  (if (not (eobp))
+      (call-interactively 'delete-char (list arg))
+    (message "Pop LISP one level")
+    (comint-send-string (get-buffer-process (current-buffer))
+                        "abort\n")))
 
 
 ;;;;; Key bindings
@@ -1159,6 +1168,10 @@
   "Return true if Lisp is busy processing a request."
   (eq (slime-state-name (slime-current-state)) 'slime-evaluating-state))
 
+(defun slime-evaluating-p ()
+  "Return true if Lisp is evaluating a request for Emacs."
+  (slime-busy-p))
+
 (defun slime-ping ()
   "Check that communication works."
   (interactive)
@@ -2350,11 +2363,15 @@
 
 (defun slime-interrupt ()
   (interactive)
-  (slime-dispatch-event '(:emacs-interrupt)))
+  (if (slime-evaluating-p)
+      (slime-dispatch-event '(:emacs-interrupt))
+    (error "Not evaluating - nothing to interrupt.")))
 
 (defun slime-quit ()
   (interactive)
-  (slime-dispatch-event '(:emacs-quit)))
+  (if (slime-evaluating-p)
+      (slime-dispatch-event '(:emacs-quit))
+    (error "Not evaluating - nothing to quit.")))
 
 (defun slime-set-package (package)
   (interactive (list (slime-read-package-name "Package: " 


Index: slime/ChangeLog
diff -u slime/ChangeLog:1.66 slime/ChangeLog:1.66.2.1
--- slime/ChangeLog:1.66	Fri Oct 24 21:54:00 2003
+++ slime/ChangeLog	Wed Oct 29 11:54:31 2003
@@ -1,3 +1,11 @@
+2003-10-29  Luke Gorrie  <luke at bluetail.com>
+
+	* slime.el (slime-interrupt, slime-quit): Only send the
+	quit/interrupt message to Lisp if it is in fact evaluating
+	something for us. This fixes a protocol bug reported by Paolo
+	Amoroso.
+	Added (require 'pp).
+	
 2003-10-25  Luke Gorrie  <luke at bluetail.com>
 
 	* Everywhere: Changed the connection setup to use a dynamic





More information about the slime-cvs mailing list