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

Helmut Eller heller at common-lisp.net
Fri Nov 28 12:02:29 UTC 2003


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

Modified Files:
	swank.lisp 
Log Message:
(slime-read-string, eval-string): Flush *emacs-io*.
(eval-in-emacs): New function.

Date: Fri Nov 28 07:02:29 2003
Author: heller

Index: slime/swank.lisp
diff -u slime/swank.lisp:1.67 slime/swank.lisp:1.68
--- slime/swank.lisp:1.67	Wed Nov 26 19:40:35 2003
+++ slime/swank.lisp	Fri Nov 28 07:02:29 2003
@@ -173,6 +173,7 @@
 
 (defun slime-read-string ()
   (force-output)
+  (force-output *slime-io*)
   (let ((*read-input-catch-tag* (1+ *read-input-catch-tag*)))
     (send-to-emacs `(:read-string ,*read-input-catch-tag*))
     (let (ok)
@@ -267,6 +268,12 @@
 
 ;;;; Evaluation
 
+(defun eval-in-emacs (form)
+  "Execute FROM in Emacs."
+  (destructuring-bind (fn &rest args) form
+    (swank::send-to-emacs 
+     `(:%apply ,(string-downcase (string fn)) ,args))))
+
 (defslimefun eval-string (string buffer-package)
   (let ((*debugger-hook* #'swank-debugger-hook))
     (let (ok result)
@@ -277,7 +284,7 @@
              (force-output)
              (setq ok t))
         (sync-state-to-emacs)
-        (force-output *slime-output*)
+        (force-output *slime-io*)
         (send-to-emacs (if ok `(:ok ,result) '(:aborted)))))))
 
 (defun format-values-for-echo-area (values)





More information about the slime-cvs mailing list