[slime-cvs] CVS update: slime/swank-cmucl.lisp

Helmut Eller heller at common-lisp.net
Mon Sep 5 13:56:38 UTC 2005


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

Modified Files:
	swank-cmucl.lisp 
Log Message:
(background-message): New function. Forward the call to the front end.
(pre-gc-hook, post-gc-hook): Use it.

(swank-sym,  sending-safe-p): Deleted.

Date: Mon Sep  5 15:56:38 2005
Author: heller

Index: slime/swank-cmucl.lisp
diff -u slime/swank-cmucl.lisp:1.152 slime/swank-cmucl.lisp:1.153
--- slime/swank-cmucl.lisp:1.152	Mon Aug 29 21:33:26 2005
+++ slime/swank-cmucl.lisp	Mon Sep  5 15:56:37 2005
@@ -2061,12 +2061,10 @@
 ;;; normal output.
 ;;;
 
-(defun swank-sym (name) (find-symbol (string name) :swank))
-(defun sending-safe-p () (symbol-value (swank-sym :*emacs-connection*)))
-
 ;; this should probably not be here, but where else?
-(defun send-to-emacs (message)
-  (funcall (swank-sym :send-to-emacs) message))
+(defun background-message (message)
+  (funcall (find-symbol (string :background-message) :swank)
+           message))
 
 (defun print-bytes (nbytes &optional stream)
   "Print the number NBYTES to STREAM in KB, MB, or GB units."
@@ -2099,8 +2097,7 @@
   (setq *gc-start-time* (get-internal-real-time))
   (let ((msg (format nil "[Commencing GC with ~A in use.]" 
 		     (print-bytes bytes-in-use))))
-    (when (sending-safe-p)
-      (send-to-emacs `(:background-message ,msg)))))
+    (background-message msg)))
 
 (defun post-gc-hook (bytes-retained bytes-freed trigger)
   (declare (ignore trigger))
@@ -2112,8 +2109,7 @@
                      #+gencgc(generation-stats)
                      #-gencgc""
                      seconds)))
-    (when (sending-safe-p)
-      (send-to-emacs `(:background-message ,msg)))))
+    (background-message msg)))
 
 (defun install-gc-hooks ()
   (setq ext:*gc-notify-before* #'pre-gc-hook)




More information about the slime-cvs mailing list