[slime-cvs] CVS slime

heller heller at common-lisp.net
Sat Aug 9 19:57:31 UTC 2008


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv20740

Modified Files:
	ChangeLog slime.el 
Log Message:
* slime.el (slime-quit-lisp): Optionally send kill signal.
(slime-quit-connection-at-point): Disconnect after some timeout.

--- /project/slime/cvsroot/slime/ChangeLog	2008/08/09 19:57:22	1.1426
+++ /project/slime/cvsroot/slime/ChangeLog	2008/08/09 19:57:31	1.1427
@@ -18,6 +18,11 @@
 
 2008-08-09  Helmut Eller  <heller at common-lisp.net>
 
+	* slime.el (slime-quit-lisp): Optionally send kill signal.
+	(slime-quit-connection-at-point): Disconnect after some timeout.
+
+2008-08-09  Helmut Eller  <heller at common-lisp.net>
+
 	Fixes for heap dumping.
 
 	* swank.lisp (*log-output*): Don't initialize at load-time,
--- /project/slime/cvsroot/slime/slime.el	2008/08/09 19:57:06	1.980
+++ /project/slime/cvsroot/slime/slime.el	2008/08/09 19:57:31	1.981
@@ -2319,6 +2319,7 @@
           ((:write-string output &optional target)
            (slime-write-string output target))
           ((:emacs-rex form package thread continuation)
+           (slime-check-eval-form form)
            (when (and (slime-use-sigint-for-interrupt) (slime-busy-p))
              (message "; pipelined request... %S" form))
            (let ((id (incf (slime-continuation-counter))))
@@ -6459,14 +6460,18 @@
 (defun slime-quit ()
   (error "Not implemented properly.  Use `slime-interrupt' instead."))
 
-(defun slime-quit-lisp (&optional keep-buffers)
+(defun slime-quit-lisp (&optional kill)
   "Quit lisp, kill the inferior process and associated buffers."
-  (interactive)
+  (interactive "P")
   (slime-eval-async '(swank:quit-lisp))
-  (let ((connection (slime-connection)))
+  (let* ((connection (slime-connection))
+         (process (slime-inferior-process connection)))
     (kill-buffer (slime-output-buffer))
     (set-process-filter connection  nil)
-    (set-process-sentinel connection 'slime-quit-sentinel)))
+    (set-process-sentinel connection 'slime-quit-sentinel)
+    (when (and kill process)
+      (sleep-for 0.2)
+      (kill-process process))))
 
 (defun slime-quit-sentinel (process message)
   (assert (process-status process) 'closed)
@@ -7476,9 +7481,13 @@
 
 (defun slime-quit-connection-at-point (connection)
   (interactive (list (slime-connection-at-point)))
-  (let ((slime-dispatching-connection connection))
-    (slime-quit-lisp)
+  (let ((slime-dispatching-connection connection)
+        (end (time-add (current-time) (seconds-to-time 3))))
+    (slime-quit-lisp t)
     (while (memq connection slime-net-processes)
+      (when (time-less-p end (current-time))
+        (message "Quit timeout expired.  Disconnecting.")
+        (delete-process connection))
       (sit-for 0 100)))
   (slime-update-connection-list))
 




More information about the slime-cvs mailing list