[slime-cvs] CVS update: slime/swank.lisp
Helmut Eller
heller at common-lisp.net
Fri Jan 9 18:51:19 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv20698
Modified Files:
swank.lisp
Log Message:
(eval-region): Bind *package* outside the unwind-protect to detect updates.
Date: Fri Jan 9 13:51:19 2004
Author: heller
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.88 slime/swank.lisp:1.89
--- slime/swank.lisp:1.88 Thu Jan 8 02:02:20 2004
+++ slime/swank.lisp Fri Jan 9 13:51:18 2004
@@ -475,17 +475,18 @@
"Evaluate STRING and return the result.
If PACKAGE-UPDATE-P is non-nil, and evaluation causes a package
change, then send Emacs an update."
- (unwind-protect
- (do ((*package* *buffer-package*)
- (str-length (length string))
- (pos 0)
- (form nil)
- (return-value nil (multiple-value-list (eval form))))
- ((= pos str-length) (values return-value form))
- (multiple-value-setq (form pos)
- (read-from-string string nil nil :start pos)))
- (when (and package-update-p (not (eq *package* *buffer-package*)))
- (send-to-emacs (list :new-package (shortest-package-nickname *package*))))))
+ (let ((*package* *buffer-package*))
+ (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)))
+ (when (and package-update-p (not (eq *package* *buffer-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