[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Tue Aug 28 08:24:55 UTC 2007


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

Modified Files:
	swank.lisp 
Log Message:
Remove the ID argument from :write-string protocol messages.
Everything, except for rigid-indentation tricks, can be achieved by
using :write-string in conjunction with :presentation-start and
:presentation-end.

	* swank.lisp (present-in-emacs): Unused, removed.

	* swank.lisp (make-output-function-for-target): Remove id argument
	from :write-string.
	(send-repl-results-to-emacs): Don't call
	save-presented-object. Remove id argument from :write-string.


--- /project/slime/cvsroot/slime/swank.lisp	2007/08/27 15:02:15	1.501
+++ /project/slime/cvsroot/slime/swank.lisp	2007/08/28 08:24:54	1.502
@@ -604,7 +604,7 @@
     (with-connection (connection)
       (with-simple-restart
           (abort "Abort sending output to Emacs.")
-        (send-to-emacs `(:write-string ,string nil ,target))))))
+        (send-to-emacs `(:write-string ,string ,target))))))
 
 (defun make-output-stream-for-target (connection target)
   "Create a stream that sends output to a specific TARGET in Emacs."
@@ -1301,25 +1301,6 @@
              ((:ok value) value)
              ((:abort) (abort)))))))
 
-(defun present-in-emacs (value-or-values &key (separated-by " "))
-  "Present VALUE in the Emacs repl buffer of the current thread."
-  (unless (consp value-or-values)
-    (setf value-or-values (list value-or-values)))
-  (flet ((present (value)
-           (if (stringp value)
-               (send-to-emacs `(:write-string ,value))
-               (let ((id (save-presented-object value)))
-                 (send-to-emacs `(:write-string ,(prin1-to-string value) ,id))))))
-    (map nil (let ((first-time-p t))
-               (lambda (value)
-                 (when (and (not first-time-p)
-                            separated-by)
-                   (present separated-by))
-                 (present value)
-                 (setf first-time-p nil)))
-         value-or-values))
-  (values))
-
 (defvar *swank-wire-protocol-version* nil
   "The version of the swank/slime communication protocol.")
 
@@ -2967,12 +2948,10 @@
 
 (defun send-repl-results-to-emacs (values)
   (flet ((send (value)
-           (let ((id (and *record-repl-results*
-                          (save-presented-object value))))
-             (send-to-emacs `(:write-string ,(prin1-to-string value)
-                              ,id :repl-result))
-             (send-to-emacs `(:write-string ,(string #\Newline) 
-                              nil :repl-result)))))
+           (send-to-emacs `(:write-string ,(prin1-to-string value)
+                                          :repl-result))
+           (send-to-emacs `(:write-string ,(string #\Newline) 
+                                          :repl-result))))
     (if (null values)
         (send-to-emacs `(:write-string "; No value" nil :repl-result))
         (mapc #'send values))))




More information about the slime-cvs mailing list