[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Thu Dec 17 10:15:19 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv1646
Modified Files:
swank.lisp ChangeLog
Log Message:
* swank.lisp (with-top-level-restart): Bind local special.
(top-level-restart-p): Check for it; this tells us if where's in
the dynamic extent of with-top-level-restart.
(handle-requests): Use it.
--- /project/slime/cvsroot/slime/swank.lisp 2009/12/17 06:25:00 1.678
+++ /project/slime/cvsroot/slime/swank.lisp 2009/12/17 10:15:19 1.679
@@ -998,24 +998,37 @@
;; We explicitly rebind (and do not look at user's
;; customization), so sldb-quit will always be our restart
;; for rex requests.
- (let ((*sldb-quit-restart* (find-restart 'abort)))
- . ,body)
+ (let ((*sldb-quit-restart* (find-restart 'abort))
+ (*toplevel-restart-available* t))
+ (declare (special *toplevel-restart-available*))
+ , at body)
(abort (&optional v)
:report "Return to SLIME's top level."
(declare (ignore v))
(force-user-output)
,k))))
+(defun top-level-restart-p ()
+ ;; FIXME: this could probably be done better; previously this used
+ ;; *SLDB-QUIT-RESTART* but we cannot use that anymore because it's
+ ;; exported now, and might hence be bound globally.
+ ;;
+ ;; The caveat is that for slime rex requests, we do not want to use
+ ;; the global value of *sldb-quit-restart* because that might be
+ ;; bound to terminate-thread, and hence `q' in the debugger would
+ ;; kill the repl thread.
+ (boundp '*toplevel-restart-available*))
+
(defun handle-requests (connection &optional timeout)
"Read and process :emacs-rex requests.
The processing is done in the extent of the toplevel restart."
- (cond ((eq *emacs-connection* connection)
- ;; *sldb-quit-restart* isn't bound here on *communication-style* NIL
- ;; (assert (boundp '*sldb-quit-restart*))
+ (cond ((top-level-restart-p)
+ (assert (boundp '*sldb-quit-restart*))
+ (assert *emacs-connection*)
(process-requests timeout))
(t
(tagbody
- start
+ start
(with-top-level-restart (connection (go start))
(process-requests timeout))))))
--- /project/slime/cvsroot/slime/ChangeLog 2009/12/17 09:49:18 1.1942
+++ /project/slime/cvsroot/slime/ChangeLog 2009/12/17 10:15:19 1.1943
@@ -1,3 +1,10 @@
+2009-12-17 Tobias C. Rittweiler <tcr at freebits.de>
+
+ * swank.lisp (with-top-level-restart): Bind local special.
+ (top-level-restart-p): Check for it; this tells us if where's in
+ the dynamic extent of with-top-level-restart.
+ (handle-requests): Use it.
+
2009-12-17 Stas Boukarev <stassats at gmail.com>
* swank-match.lisp: Fix formatting and style warnings.
@@ -11,7 +18,7 @@
2009-12-16 Tobias C. Rittweiler <tcr at freebits.de>
- * swank-sbcl.org (categorize-definition-source): New.
+ * swank-sbcl.lisp (categorize-definition-source): New.
(definition-source-for-emacs): Use it. Slightly
refactored. Renamed from `make-definition-source-location'.
(find-definitions, find-source-location)
More information about the slime-cvs
mailing list