[slime-cvs] CVS slime
CVS User sboukarev
sboukarev at common-lisp.net
Wed Feb 2 10:13:07 UTC 2011
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv14498
Modified Files:
ChangeLog slime.el swank.lisp
Log Message:
* slime.el (slime-eval-for-lisp): Return value as a string,
because it can be unreadable, e.g. #<buffer foo>
* swank.lisp (eval-in-emacs): Prevent reader errors.
--- /project/slime/cvsroot/slime/ChangeLog 2011/02/02 09:22:33 1.2172
+++ /project/slime/cvsroot/slime/ChangeLog 2011/02/02 10:13:07 1.2173
@@ -1,5 +1,11 @@
2011-02-02 Stas Boukarev <stassats at gmail.com>
+ * slime.el (slime-eval-for-lisp): Return value as a string,
+ because it can be unreadable, e.g. #<buffer foo>
+ * swank.lisp (eval-in-emacs): Prevent reader errors.
+
+2011-02-02 Stas Boukarev <stassats at gmail.com>
+
* swank.lisp (eval-in-emacs): Export it.
2011-01-28 Stas Boukarev <stassats at gmail.com>
--- /project/slime/cvsroot/slime/slime.el 2011/01/28 19:19:30 1.1353
+++ /project/slime/cvsroot/slime/slime.el 2011/02/02 10:13:07 1.1354
@@ -4014,7 +4014,9 @@
(slime-check-eval-in-emacs-enabled)
(setq value (eval (read form-string)))
(setq ok t))
- (let ((result (if ok `(:ok ,value) `(:abort))))
+ (let ((result (if ok
+ `(:ok ,(prin1-to-string value))
+ `(:abort))))
(slime-dispatch-event `(:emacs-return ,thread ,tag ,result) c)))))
(defun slime-check-eval-in-emacs-enabled ()
--- /project/slime/cvsroot/slime/swank.lisp 2011/02/02 09:22:33 1.736
+++ /project/slime/cvsroot/slime/swank.lisp 2011/02/02 10:13:07 1.737
@@ -1819,7 +1819,7 @@
(princ-to-string form)))))
(defun eval-in-emacs (form &optional nowait)
- "Eval FORM in Emacs.
+ "Eval FORM in Emacs.
`slime-enable-evaluate-in-emacs' should be set to T on the Emacs side."
(cond (nowait
(send-to-emacs `(:eval-no-wait ,(process-form-for-emacs form))))
@@ -1830,7 +1830,9 @@
,(process-form-for-emacs form)))
(let ((value (caddr (wait-for-event `(:emacs-return ,tag result)))))
(destructure-case value
- ((:ok value) value)
+ ((:ok value)
+ (handler-case (values (read-from-string value))
+ (reader-error () value)))
((:abort) (abort))))))))
(defvar *swank-wire-protocol-version* nil
More information about the slime-cvs
mailing list