[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Tue Dec 15 21:56:55 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv19560

Modified Files:
	ChangeLog swank-sbcl.lisp swank.lisp 
Log Message:
	* swank.lisp (collect-notes): Establish new abort restart ("Abort
	Compilation"); if an error is signaled in EVAL-WHEN, or during
	macroexpansion -- assuming the backend DTRT --, invoking this
	restart will result in the normal compilation failure behaviour,
	including correct reporting of the offending toplevel form.

	* swank-sbcl.lisp (handle-notification-condition): Use
	`real-condition' here.
	(handle-file-compiler-termination): As a result, not needed anymore.
	(call-with-compilation-hooks): Also signal information about
	normal errors.


--- /project/slime/cvsroot/slime/ChangeLog	2009/12/14 09:06:34	1.1936
+++ /project/slime/cvsroot/slime/ChangeLog	2009/12/15 21:56:55	1.1937
@@ -1,3 +1,17 @@
+2009-12-15  Tobias C. Rittweiler <tcr at freebits.de>
+
+	* swank.lisp (collect-notes): Establish new abort restart ("Abort
+	Compilation"); if an error is signaled in EVAL-WHEN, or during
+	macroexpansion -- assuming the backend DTRT --, invoking this
+	restart will result in the normal compilation failure behaviour,
+	including correct reporting of the offending toplevel form.
+
+	* swank-sbcl.lisp (handle-notification-condition): Use
+	`real-condition' here.
+	(handle-file-compiler-termination): As a result, not needed anymore.
+	(call-with-compilation-hooks): Also signal information about
+	normal errors.
+
 2009-12-14  Stas Boukarev  <stassats at gmail.com>
 
 	* doc/slime.texi (ASDF): Document new commands.
--- /project/slime/cvsroot/slime/swank-sbcl.lisp	2009/12/10 23:07:38	1.259
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp	2009/12/15 21:56:55	1.260
@@ -422,7 +422,8 @@
     (when (typep condition 'warning)
       (signal condition))
     (setq *previous-compiler-condition* condition)
-    (signal-compiler-condition condition (sb-c::find-error-context nil))))
+    (signal-compiler-condition (real-condition condition)
+                               (sb-c::find-error-context nil))))
 
 (defun signal-compiler-condition (condition context)
   (signal (make-condition
@@ -431,14 +432,14 @@
            :severity (etypecase condition
                        (sb-c:compiler-error  :error)
                        (sb-ext:compiler-note :note)
+                       (error                :error)
+                       (reader-error         :read-error)
                        #+#.(swank-backend::with-symbol redefinition-warning sb-kernel)
                        (sb-kernel:redefinition-warning
                                              :redefinition)
                        (style-warning        :style-warning)
-                       (warning              :warning)
-                       (reader-error         :read-error)
-                       (error                :error))
-           :references (condition-references (real-condition condition))
+                       (warning              :warning))
+           :references (condition-references condition)
            :message (brief-compiler-message-for-emacs condition)
            :source-context (compiler-error-context context)
            :location (compiler-note-location condition context))))
@@ -543,16 +544,13 @@
       ;; N.B. Even though these handlers are called HANDLE-FOO they
       ;; actually decline, i.e. the signalling of the original
       ;; condition continues upward.
-      ((sb-c:fatal-compiler-error #'handle-file-compiler-termination)
-       (sb-c:compiler-error  #'handle-notification-condition)
-       (sb-ext:compiler-note #'handle-notification-condition)
-       (warning              #'handle-notification-condition))
+      ((sb-c:fatal-compiler-error #'handle-notification-condition)
+       (sb-c:compiler-error       #'handle-notification-condition)
+       (sb-ext:compiler-note      #'handle-notification-condition)
+       (error                     #'handle-notification-condition)
+       (warning                   #'handle-notification-condition))
     (funcall function)))
 
-(defun handle-file-compiler-termination (condition)
-  "Handle a condition that caused the file compiler to terminate."
-  (handle-notification-condition
-   (sb-int:encapsulated-condition condition)))
 
 (defvar *trap-load-time-warnings* nil)
 
--- /project/slime/cvsroot/slime/swank.lisp	2009/12/10 23:15:42	1.674
+++ /project/slime/cvsroot/slime/swank.lisp	2009/12/15 21:56:55	1.675
@@ -2802,7 +2802,12 @@
     (multiple-value-bind (successp seconds)
         (handler-bind ((compiler-condition
                         (lambda (c) (push (make-compiler-note c) notes))))
-          (measure-time-interval function))
+          (measure-time-interval
+           #'(lambda ()
+               ;; To report location of error-signaling toplevel forms
+               ;; for errors in EVAL-WHEN or during macroexpansion.
+               (with-simple-restart (abort "Abort compilation.")
+                 (funcall function)))))
       (make-compilation-result (reverse notes) (and successp t) seconds))))
 
 (defslimefun compile-file-for-emacs (filename load-p &optional options)





More information about the slime-cvs mailing list