[slime-cvs] CVS update: slime/swank.lisp
Vladimir Sedach
vsedach at common-lisp.net
Mon Jan 12 05:14:13 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv29313
Modified Files:
swank.lisp
Log Message:
Changed eval-region back to with-input-from-string style. For slime's
purposes, read-from-string doesn't do the right thing with trailing
whitespace, which is not easy to work around it.
Date: Mon Jan 12 00:14:13 2004
Author: vsedach
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.91 slime/swank.lisp:1.92
--- slime/swank.lisp:1.91 Sun Jan 11 23:31:31 2004
+++ slime/swank.lisp Mon Jan 12 00:14:13 2004
@@ -554,18 +554,20 @@
"Evaluate STRING and return the result.
If PACKAGE-UPDATE-P is non-nil, and evaluation causes a package
change, then send Emacs an update."
- (let ((*package* *buffer-package*))
+ (let ((*package* *buffer-package*)
+ - values)
(unwind-protect
- (do ((length (length string))
- (pos 0)
- (- nil)
- (return-value nil (multiple-value-list (eval -))))
- ((= pos length) (values return-value -))
- (multiple-value-setq (- pos)
- (read-from-string string nil nil :start pos)))
+ (with-input-from-string (stream string)
+ (loop for form = (read stream nil stream)
+ until (eq form stream)
+ do (progn
+ (setq - form)
+ (setq values (multiple-value-list (eval form)))
+ (force-output))
+ finally (return (values values -))))
(when (and package-update-p (not (eq *package* *buffer-package*)))
- (send-to-emacs (list :new-package
- (shortest-package-nickname *package*)))))))
+ (send-to-emacs
+ (list :new-package (shortest-package-nickname *package*)))))))
(defun shortest-package-nickname (package)
"Return the shortest nickname (or canonical name) of PACKAGE."
More information about the slime-cvs
mailing list