[slime-cvs] CVS slime

heller heller at common-lisp.net
Mon Aug 11 07:39:05 UTC 2008


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

Modified Files:
	ChangeLog slime.el 
Log Message:
(slime-quit-lisp-internal): New function.
(slime-quit-lisp, slime-restart-inferior-lisp): Use it

--- /project/slime/cvsroot/slime/ChangeLog	2008/08/11 07:38:04	1.1434
+++ /project/slime/cvsroot/slime/ChangeLog	2008/08/11 07:39:02	1.1435
@@ -7,6 +7,8 @@
 	(slime-run-tests): Save repl-history in /tmp.
 	(slime-repl-mode): Ignore persistent history if
 	slime-repl-history-file is nil.
+	(slime-quit-lisp-internal): New function.
+	(slime-quit-lisp, slime-restart-inferior-lisp): Use it
 
 2008-08-10  Helmut Eller  <heller at common-lisp.net>
 
--- /project/slime/cvsroot/slime/slime.el	2008/08/11 07:38:05	1.985
+++ /project/slime/cvsroot/slime/slime.el	2008/08/11 07:39:02	1.986
@@ -3768,9 +3768,7 @@
 (defun slime-restart-inferior-lisp ()
   (interactive)
   (assert (slime-inferior-process) () "No inferior lisp process")
-  (slime-eval-async '(swank:quit-lisp))
-  (set-process-filter (slime-connection) nil)
-  (set-process-sentinel (slime-connection) 'slime-restart-sentinel))
+  (slime-quit-lisp-internal (slime-connection) 'slime-restart-sentinel t))
 
 (defun slime-restart-sentinel (process message)
   "Restart the inferior lisp process.
@@ -6465,15 +6463,18 @@
 (defun slime-quit-lisp (&optional kill)
   "Quit lisp, kill the inferior process and associated buffers."
   (interactive "P")
-  (slime-eval-async '(swank:quit-lisp))
-  (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)
-    (when (and kill process)
-      (sleep-for 0.2)
-      (kill-process process))))
+  (slime-quit-lisp-internal (slime-connection) 'slime-quit-sentinel kill))
+
+(defun slime-quit-lisp-internal (connection sentinel kill)
+  (let ((slime-dispatching-connection connection))
+    (slime-eval-async '(swank:quit-lisp))
+    (let* ((process (slime-inferior-process connection)))
+      (kill-buffer (slime-output-buffer))
+      (set-process-filter connection  nil)
+      (set-process-sentinel connection sentinel)
+      (when (and kill process)
+        (sleep-for 0.2)
+        (kill-process process)))))
 
 (defun slime-quit-sentinel (process message)
   (assert (process-status process) 'closed)




More information about the slime-cvs mailing list