[slime-cvs] CVS update: slime/swank.lisp
Helmut Eller
heller at common-lisp.net
Sun Dec 5 21:06:54 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv23361
Modified Files:
swank.lisp
Log Message:
(eval-region): Use a simple loop.
Date: Sun Dec 5 22:06:53 2004
Author: heller
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.268 slime/swank.lisp:1.269
--- slime/swank.lisp:1.268 Thu Dec 2 18:11:50 2004
+++ slime/swank.lisp Sun Dec 5 22:06:52 2004
@@ -616,8 +616,9 @@
(defun send-to-socket-io (event)
(log-event "DISPATCHING: ~S~%" event)
- (flet ((send (o) (without-interrupts
- (encode-message o (current-socket-io)))))
+ (flet ((send (o)
+ (without-interrupts
+ (encode-message o (current-socket-io)))))
(destructure-case event
(((:debug-activate :debug :debug-return :read-string :read-aborted)
thread &rest args)
@@ -1202,23 +1203,22 @@
"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 (- values)
- (unwind-protect
- (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 (progn
- (fresh-line)
- (force-output)
- (return (values values -)))))
- (when (and package-update-p (not (eq *package* *buffer-package*)))
- (send-to-emacs
- (list :new-package (package-name *package*)
- (package-string-for-prompt *package*)))))))
+ (unwind-protect
+ (with-input-from-string (stream string)
+ (let (- values)
+ (loop
+ (let ((form (read stream nil stream)))
+ (when (eq form stream)
+ (fresh-line)
+ (force-output)
+ (return (values values -)))
+ (setq - form)
+ (setq values (multiple-value-list (eval form)))
+ (force-output)))))
+ (when (and package-update-p (not (eq *package* *buffer-package*)))
+ (send-to-emacs
+ (list :new-package (package-name *package*)
+ (package-string-for-prompt *package*))))))
(defun package-string-for-prompt (package)
"Return the shortest nickname (or canonical name) of PACKAGE."
More information about the slime-cvs
mailing list