[slime-cvs] CVS update: slime/slime.el
Luke Gorrie
lgorrie at common-lisp.net
Tue Dec 16 10:07:11 UTC 2003
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv28175
Modified Files:
slime.el
Log Message:
(slime-output-oneway-evaluate-request): New function to evaluate an
expression for side-effects (without getting a result).
(slime-idle-state): Handle new :emacs-evaluate-oneway.
(slime-debugging-state): Handle :emacs-evaluate-oneway. Also handle
:read-string.
(sldb-invoke-restart): Use slime-oneway-eval. This avoids pushing an
evaluating state (which will be aborted, and print an unnecessary
message saying so).
(sldb-break-with-default-debugger): New command to break into the
default TTY debugger. Bound to 'B' in *sldb*.
Date: Tue Dec 16 05:07:11 2003
Author: lgorrie
Index: slime/slime.el
diff -u slime/slime.el:1.149 slime/slime.el:1.150
--- slime/slime.el:1.149 Tue Dec 16 02:59:35 2003
+++ slime/slime.el Tue Dec 16 05:07:10 2003
@@ -1315,7 +1315,9 @@
(current-window-configuration))))
((:emacs-evaluate form-string package-name continuation)
(slime-output-evaluate-request form-string package-name)
- (slime-push-state (slime-evaluating-state continuation))))
+ (slime-push-state (slime-evaluating-state continuation)))
+ ((:emacs-evaluate-oneway form-string package-name)
+ (slime-output-oneway-evaluate-request form-string package-name)))
(defvar slime-evaluating-state-activation-hook nil
"Hook called when the evaluating state is actived.")
@@ -1378,7 +1380,11 @@
((:emacs-evaluate form-string package-name continuation)
;; recursive evaluation request
(slime-output-evaluate-request form-string package-name)
- (slime-push-state (slime-evaluating-state continuation))))
+ (slime-push-state (slime-evaluating-state continuation)))
+ ((:emacs-evaluate-oneway form-string package-name)
+ (slime-output-oneway-evaluate-request form-string package-name))
+ ((:read-string tag)
+ (slime-push-state (slime-read-string-state tag))))
(slime-defstate slime-read-string-state (tag)
"Reading state.
@@ -1402,6 +1408,10 @@
"Send a request for LISP to read and evaluate FORM-STRING in PACKAGE-NAME."
(slime-net-send `(swank:eval-string ,form-string ,package-name)))
+(defun slime-output-oneway-evaluate-request (form-string package-name)
+ "Like `slime-output-oneway-evaluate-request' but without expecting a result."
+ (slime-net-send `(swank:oneway-eval-string ,form-string ,package-name)))
+
(defun slime-check-connected ()
(unless (slime-connected-p)
(error "Not connected. Use `M-x slime' to start a Lisp.")))
@@ -1456,6 +1466,14 @@
(slime-check-connected)
(slime-eval-string-async (prin1-to-string sexp) package `(:function ,cont)))
+(defun slime-oneway-eval (sexp &optional package)
+ "Evaluate SEXP \"one-way\" - without receiving a return value."
+ (slime-check-connected)
+ (when (slime-busy-p)
+ (error "Busy evaluating"))
+ (slime-dispatch-event
+ `(:emacs-evaluate-oneway ,(prin1-to-string sexp) ,package)))
+
(defun slime-sync ()
"Block until any asynchronous command has completed."
(while (slime-busy-p)
@@ -3846,11 +3864,15 @@
(let ((restart (or number
(sldb-restart-at-point)
(error "No restart at point"))))
- (slime-eval-async `(swank:invoke-nth-restart ,restart) nil (lambda ()))))
+ (slime-oneway-eval `(swank:invoke-nth-restart-for-emacs ,sldb-level ,restart) nil)))
(defun sldb-restart-at-point ()
(get-text-property (point) 'restart-number))
+(defun sldb-break-with-default-debugger ()
+ (interactive)
+ (slime-eval-async '(swank:sldb-break-with-default-debugger) nil (lambda (_))))
+
(defun sldb-step ()
(interactive)
(let ((frame (sldb-frame-number-at-point)))
@@ -3883,6 +3905,7 @@
("s" 'sldb-step)
("a" 'sldb-abort)
("q" 'sldb-quit)
+ ("B" 'sldb-break-with-default-debugger)
(":" 'slime-interactive-eval))
(dolist (spec slime-keys)
More information about the slime-cvs
mailing list