[slime-cvs] CVS slime

heller heller at common-lisp.net
Tue Sep 4 09:49:10 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv20778

Modified Files:
	ChangeLog swank-backend.lisp swank.lisp swank-sbcl.lisp 
	slime.el 
Log Message:
Remove request-abort condition.

* swank-backend.lisp (request-abort): Removed
(abort-request): Removed.  Replace all (3) uses with ERROR.
* swank.lisp (eval-for-emacs): No special case for request-abort.
* slime.el (slime-eval-async): Remove optional arg of :abort.



--- /project/slime/cvsroot/slime/ChangeLog	2007/09/04 09:42:41	1.1193
+++ /project/slime/cvsroot/slime/ChangeLog	2007/09/04 09:49:09	1.1194
@@ -1,5 +1,14 @@
 2007-09-04  Helmut Eller  <heller at common-lisp.net>
 
+	Remove request-abort condition.
+
+	* swank-backend.lisp (request-abort): Removed
+	(abort-request): Removed.  Replace all (3) uses with ERROR.
+	* swank.lisp (eval-for-emacs): No special case for request-abort.
+	* slime.el (slime-eval-async): Remove optional arg of :abort.
+
+2007-09-04  Helmut Eller  <heller at common-lisp.net>
+
 	Rename slime-insert-possibly-as-rectangle to slime-insert-indented.
 
 	* slime.el (slime-insert-indented): Renamed. Update callers.
--- /project/slime/cvsroot/slime/swank-backend.lisp	2007/08/23 19:32:56	1.122
+++ /project/slime/cvsroot/slime/swank-backend.lisp	2007/09/04 09:49:09	1.123
@@ -15,8 +15,6 @@
   (:export #:sldb-condition
            #:original-condition
            #:compiler-condition
-           #:abort-request
-           #:request-abort
            #:message
            #:short-message
            #:condition
@@ -166,20 +164,6 @@
          (warn "DEFIMPLEMENTATION of undefined interface (~S)" ',name))
      ',name))
 
-(define-condition request-abort (error)
-  ((reason  :initarg :reason :reader reason))
-  (:report (lambda (condition stream)
-             (princ (reason condition) stream)))
-  (:documentation "Condition signalled when SLIME wasn't able to
-complete a user request due to bad data. This condition is not
-for real errors but for situations where SLIME has to give up and
-return control back to the user."))
-
-(defun abort-request (reason-control &rest reason-args)
-  "Abort whatever swank is currently do and send a message to the
-user."
-  (error 'request-abort :reason (apply #'format nil reason-control reason-args)))
-
 (defun warn-unimplemented-interfaces ()
   "Warn the user about unimplemented backend features.
 The portable code calls this function at startup."
@@ -367,12 +351,12 @@
 Example:
 \(operate-on-system \"SWANK\" \"COMPILE-OP\" :force t)"
   (unless (member :asdf *features*)
-    (abort-request "ASDF is not loaded."))
+    (error "ASDF is not loaded."))
   (with-compilation-hooks ()
     (let ((operate (find-symbol (symbol-name '#:operate) :asdf))
           (operation (find-symbol operation-name :asdf)))
       (when (null operation)
-        (abort-request "Couldn't find ASDF operation ~S" operation-name))
+        (error "Couldn't find ASDF operation ~S" operation-name))
       (apply operate operation system-name keyword-args))))
 
 (definterface swank-compile-file (filename load-p external-format)
--- /project/slime/cvsroot/slime/swank.lisp	2007/08/31 11:48:23	1.507
+++ /project/slime/cvsroot/slime/swank.lisp	2007/09/04 09:49:09	1.508
@@ -1657,7 +1657,7 @@
   (call-with-debugger-hook
    #'swank-debugger-hook
    (lambda ()
-     (let (ok result reason)
+     (let (ok result)
        (unwind-protect
             (let ((*buffer-package* (guess-buffer-package buffer-package))
                   (*buffer-readtable* (guess-buffer-readtable buffer-package))
@@ -1666,20 +1666,15 @@
               (check-type *buffer-readtable* readtable)
               ;; APPLY would be cleaner than EVAL. 
               ;;(setq result (apply (car form) (cdr form)))
-              (handler-case
-                  (progn
-                    (setq result (eval form))
-                    (run-hook *pre-reply-hook*)
-                    (finish-output)
-                    (setq ok t))
-                (request-abort (c)
-                  (setf ok nil)
-                  (setf reason (swank-backend::reason c)))))
+              (setq result (eval form))
+              (run-hook *pre-reply-hook*)
+              (finish-output)
+              (setq ok t))
          (force-user-output)
          (send-to-emacs `(:return ,(current-thread)
                                   ,(if ok
                                        `(:ok ,result)
-                                       `(:abort ,reason)) 
+                                       `(:abort))
                                   ,id)))))))
 
 (defvar *echo-area-prefix* "=> "
--- /project/slime/cvsroot/slime/swank-sbcl.lisp	2007/08/24 06:41:54	1.181
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp	2007/09/04 09:49:09	1.182
@@ -787,7 +787,7 @@
 (defun fallback-source-location (code-location)
   (let ((fun (code-location-debug-fun-fun code-location)))
     (cond (fun (function-source-location fun))
-          (t (abort-request "Cannot find source location for: ~A " code-location)))))
+          (t (error "Cannot find source location for: ~A " code-location)))))
 
 (defun lisp-source-location (code-location)
   (let ((source (prin1-to-string
--- /project/slime/cvsroot/slime/slime.el	2007/09/04 09:42:41	1.842
+++ /project/slime/cvsroot/slime/slime.el	2007/09/04 09:49:09	1.843
@@ -2443,7 +2443,7 @@
 CLAUSES is a list of patterns with same syntax as
 `destructure-case'.  The result of the evaluation of SEXP is
 dispatched on CLAUSES.  The result is either a sexp of the
-form (:ok VALUE) or (:abort REASON).  CLAUSES is executed
+form (:ok VALUE) or (:abort).  CLAUSES is executed
 asynchronously.
 
 Note: don't use backquote syntax for SEXP, because Emacs20 cannot
@@ -2527,8 +2527,8 @@
             (error "tag = %S eval-tags = %S sexp = %S"
                    tag slime-stack-eval-tags sexp))
           (throw tag (list #'identity value)))
-         ((:abort &optional reason)
-          (throw tag (list #'error (or reason "Synchronous Lisp Evaluation aborted.")))))
+         ((:abort)
+          (throw tag (list #'error "Synchronous Lisp Evaluation aborted."))))
        (let ((debug-on-quit t)
              (inhibit-quit nil)
              (conn (slime-connection)))
@@ -2543,8 +2543,8 @@
       (sexp (or package (slime-current-package)))
     ((:ok result)
      (when cont (funcall cont result)))
-    ((:abort &optional reason) 
-     (message (or reason "Evaluation aborted.")))))
+    ((:abort)
+     (message "Evaluation aborted."))))
 
 ;;; These functions can be handy too:
 
@@ -3174,8 +3174,8 @@
       ((list 'swank:listener-eval string) (slime-lisp-package))
     ((:ok result)
      (slime-repl-insert-result result))
-    ((:abort &optional reason)
-     (slime-repl-show-abort reason))))
+    ((:abort)
+     (slime-repl-show-abort))))
 
 (defun slime-repl-insert-result (result)
   (with-current-buffer (slime-output-buffer)
@@ -3193,13 +3193,11 @@
                   (insert "\n")))))))
     (slime-repl-insert-prompt)))
 
-(defun slime-repl-show-abort (reason)
+(defun slime-repl-show-abort ()
   (with-current-buffer (slime-output-buffer)
     (slime-with-output-end-mark 
      (unless (bolp) (insert-before-markers "\n"))
-     (insert-before-markers (if reason
-                                (concat "; Evaluation aborted: " reason "\n")
-                                "; Evaluation aborted.\n")))
+     (insert-before-markers "; Evaluation aborted.\n"))
     (slime-repl-insert-prompt)))
 
 (defun slime-repl-insert-prompt ()
@@ -7389,7 +7387,7 @@
   (interactive)
   (slime-rex () ('(swank:throw-to-toplevel))
     ((:ok _) (error "sldb-quit returned"))
-    ((:abort &optional _))))
+    ((:abort))))
 
 (defun sldb-continue ()
   "Invoke the \"continue\" restart."
@@ -7399,7 +7397,7 @@
     ((:ok _)
      (message "No restart named continue")
      (ding))
-    ((:abort &optional _))))
+    ((:abort))))
 
 (defun sldb-abort ()
   "Invoke the \"abort\" restart."
@@ -7416,14 +7414,14 @@
     (slime-rex ()
         ((list 'swank:invoke-nth-restart-for-emacs sldb-level restart))
       ((:ok value) (message "Restart returned: %s" value))
-      ((:abort &optional _)))))
+      ((:abort)))))
 
 (defun sldb-break-with-default-debugger ()
   "Enter default debugger."
   (interactive)
   (slime-rex ()
       ('(swank:sldb-break-with-default-debugger) nil slime-current-thread)
-    ((:abort &optional _))))
+    ((:abort))))
 
 (defun sldb-step ()
   "Select the \"continue\" restart and set a new break point."
@@ -7465,7 +7463,7 @@
     (slime-rex ()
         ((list 'swank:sldb-return-from-frame number string))
       ((:ok value) (message "%s" value))
-      ((:abort &optional _)))))
+      ((:abort)))))
 
 (defun sldb-restart-frame ()
   "Causes the frame to restart execution with the same arguments as it
@@ -7475,7 +7473,7 @@
     (slime-rex ()
         ((list 'swank:restart-frame number))
       ((:ok value) (message "%s" value))
-      ((:abort &optional _)))))
+      ((:abort)))))
 
 
 ;;;;; SLDB references (rather SBCL specific)




More information about the slime-cvs mailing list