[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Sun Aug 2 12:57:23 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv2102
Modified Files:
ChangeLog slime.el swank-backend.lisp swank-sbcl.lisp
Log Message:
* swank-backend.lisp (severity [type]): Allow :redefinition.
* swank-sbcl.lisp (signal-compiler-condition): Tag redefinitions.
* slime.el (slime-maybe-show-compilation-log): Do not show
compilation log if each note describes just a redefinition.
(slime-insert-compilation-log): Insert notes indented by 2
spaces. Insert some more newlines so the buffer appears more
structured.
(slime-show-note-counts): Add :redefinition to ecase.
(slime-redefinition-note-p): New.
(slime-severity-label): Was unused. Adapted to be usable.
--- /project/slime/cvsroot/slime/ChangeLog 2009/07/30 23:27:05 1.1821
+++ /project/slime/cvsroot/slime/ChangeLog 2009/08/02 12:57:23 1.1822
@@ -1,3 +1,18 @@
+2009-08-02 Tobias C. Rittweiler <tcr at freebits.de>
+
+ * swank-backend.lisp (severity [type]): Allow :redefinition.
+
+ * swank-sbcl.lisp (signal-compiler-condition): Tag redefinitions.
+
+ * slime.el (slime-maybe-show-compilation-log): Do not show
+ compilation log if each note describes just a redefinition.
+ (slime-insert-compilation-log): Insert notes indented by 2
+ spaces. Insert some more newlines so the buffer appears more
+ structured.
+ (slime-show-note-counts): Add :redefinition to ecase.
+ (slime-redefinition-note-p): New.
+ (slime-severity-label): Was unused. Adapted to be usable.
+
2009-07-30 Stas Boukarev <stassats at gmail.com>
* doc/slime.texi (Setting up pathname translations): add that it is
--- /project/slime/cvsroot/slime/slime.el 2009/07/26 10:18:29 1.1202
+++ /project/slime/cvsroot/slime/slime.el 2009/08/02 12:57:23 1.1203
@@ -2774,10 +2774,10 @@
(let ((nerrors 0) (nwarnings 0) (nstyle-warnings 0) (nnotes 0))
(dolist (note notes)
(ecase (slime-note.severity note)
- ((:error :read-error) (incf nerrors))
- (:warning (incf nwarnings))
- (:style-warning (incf nstyle-warnings))
- (:note (incf nnotes))))
+ ((:error :read-error) (incf nerrors))
+ ((:warning) (incf nwarnings))
+ ((:redefinition :style-warning) (incf nstyle-warnings))
+ ((:note) (incf nnotes))))
(message "%s:%s%s%s%s%s"
(if successp
"Compilation finished"
@@ -2934,6 +2934,9 @@
(defun slime-note-has-location-p (note)
(not (eq ':error (car (slime-note.location note)))))
+(defun slime-redefinition-note-p (note)
+ (eq (slime-note.severity note) :redefinition))
+
(defun slime-create-compilation-log (notes)
"Create a buffer for `next-error' to use."
(with-current-buffer (get-buffer-create "*SLIME Compilation*")
@@ -2945,7 +2948,8 @@
"Display the log on failed compilations or if NOTES is non-nil."
(with-struct (slime-compilation-result. notes duration successp)
slime-last-compilation-result
- (when (or notes (not successp))
+ (when (or (and notes (not (every #'slime-redefinition-note-p notes)))
+ (not successp))
(slime-with-popup-buffer ("*SLIME Compilation*")
(slime-insert-compilation-log notes)
(let ((inhibit-read-only t))
@@ -2968,11 +2972,12 @@
(insert (format "cd %s\n%d compiler notes:\n"
default-directory (length notes)))
(dolist (note notes)
- (insert (format "%s%s:\n%s\n"
+ (insert (format "\n%s%s:\n"
(slime-compilation-loc (slime-note.location note))
- (substring (symbol-name (slime-note.severity note))
- 1)
- (slime-note.message note)))))
+ (slime-severity-label (slime-note.severity note))))
+ (slime-with-rigid-indentation 2
+ (insert (slime-note.message note))
+ (insert "\n"))))
(setq next-error-last-buffer (current-buffer))))
(defun slime-compilation-loc (location)
@@ -3018,12 +3023,7 @@
(plist-get note :location))
(defun slime-severity-label (severity)
- (ecase severity
- (:note "Notes")
- (:warning "Warnings")
- (:error "Errors")
- (:read-error "Read Errors")
- (:style-warning "Style Warnings")))
+ (subseq (symbol-name severity) 1))
;;;;; Adding a single compiler note
--- /project/slime/cvsroot/slime/swank-backend.lisp 2009/07/11 18:25:15 1.178
+++ /project/slime/cvsroot/slime/swank-backend.lisp 2009/08/02 12:57:23 1.179
@@ -13,8 +13,8 @@
(defpackage :swank-backend
(:use :common-lisp)
(:export #:sldb-condition
- #:original-condition
#:compiler-condition
+ #:original-condition
#:message
#:short-message
#:condition
@@ -410,7 +410,7 @@
like `compile-file'")
(deftype severity ()
- '(member :error :read-error :warning :style-warning :note))
+ '(member :error :read-error :warning :style-warning :note :redefinition))
;; Base condition type for compiler errors, warnings and notes.
(define-condition compiler-condition (condition)
--- /project/slime/cvsroot/slime/swank-sbcl.lisp 2009/07/26 10:18:17 1.245
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2009/08/02 12:57:23 1.246
@@ -1,4 +1,4 @@
-;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
+;;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; swank-sbcl.lisp --- SLIME backend for SBCL.
;;;
@@ -407,6 +407,7 @@
(sb-introspect:deftype-lambda-list typespec-operator)
(if foundp arglist (call-next-method))))
+
(defvar *buffer-name* nil)
(defvar *buffer-offset*)
(defvar *buffer-substring* nil)
@@ -435,6 +436,8 @@
:severity (etypecase condition
(sb-c:compiler-error :error)
(sb-ext:compiler-note :note)
+ (sb-kernel:redefinition-warning
+ :redefinition)
(style-warning :style-warning)
(warning :warning)
(reader-error :read-error)
More information about the slime-cvs
mailing list