[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Sat Mar 7 19:08:03 UTC 2009


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

Modified Files:
	swank-sbcl.lisp slime.el ChangeLog 
Log Message:
	* slime.el (slime-choose-overlay-region): Special case :read-error
	notes regardless of position kind.

	* swank-sbcl.lisp (signal-compiler-condition): Return :READ-ERROR
	as severity for reader-errors.
	(compiler-note-location): Fix off-by-one when compiling from
	buffer.


--- /project/slime/cvsroot/slime/swank-sbcl.lisp	2009/03/07 10:14:42	1.236
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp	2009/03/07 19:08:03	1.237
@@ -382,6 +382,7 @@
                        (sb-ext:compiler-note :note)
                        (style-warning        :style-warning)
                        (warning              :warning)
+                       (reader-error         :read-error)
                        (error                :error))
            :short-message (brief-compiler-message-for-emacs condition)
            :references (condition-references (real-condition condition))
@@ -413,11 +414,15 @@
              (unless (open-stream-p stream)
                (bailout))
              (if (compiling-from-buffer-p file)
+                 ;; The stream position for e.g. "comma not inside backquote"
+                 ;; is at the character following the comma, :offset is 0-based,
+                 ;; hence the 1-.
                  (make-location (list :buffer *buffer-name*)
                                 (list :offset *buffer-offset*
-                                      (file-position stream)))
+                                      (1- (file-position stream))))
                  (progn
                    (assert (compiling-from-file-p file))
+                   ;; No 1- because :position is 1-based.
                    (make-location (list :file (namestring file))
                                   (list :position (file-position stream)))))))
           (t (bailout)))))
--- /project/slime/cvsroot/slime/slime.el	2009/03/06 23:23:52	1.1143
+++ /project/slime/cvsroot/slime/slime.el	2009/03/07 19:08:03	1.1144
@@ -3006,14 +3006,11 @@
         ((:error _) _ nil)                 ; do nothing
         ((:location file pos _hints)
          (cond ((eq (car file) ':source-form) nil)
-               (t
-                (destructure-case pos
-                  ((:position pos &optional alignp)
-                   (if (eq (slime-note.severity note) :read-error)
-                       (values pos (1+ pos))
-                     (slime-choose-overlay-for-sexp location)))
-                  (t 
-                   (slime-choose-overlay-for-sexp location))))))))))
+               ((eq (slime-note.severity note) :read-error)
+                (let ((pos (slime-location-offset location)))
+                  (values pos (1+ pos))))
+               (t 
+                (slime-choose-overlay-for-sexp location))))))))
           
 (defun slime-choose-overlay-for-sexp (location)
   (slime-goto-source-location location)
@@ -6347,12 +6344,12 @@
           (t
            (error "No clickable part here")))))
 
-;;(defun slime-inspector-copy-down (number)
-;;  "Evaluate the slot at point via the REPL (to set `*')."
-;;  (interactive (list (or (get-text-property (point) 'slime-part-number)
-;;                         (error "No part at point"))))
-;;  (slime-repl-send-string (format "%s" `(swank:inspector-nth-part ,number)))
-;;  (slime-repl))
+;; (defun slime-inspector-copy-down (number)
+;;   "Evaluate the slot at point via the REPL (to set `*')."
+;;   (interactive (list (or (get-text-property (point) 'slime-part-number)
+;;                          (error "No part at point"))))
+;;   (slime-repl-send-string (format "%s" `(swank:inspector-nth-part ,number)))
+;;   (slime-repl))
 
 (defun slime-inspector-pop ()
   (interactive)
--- /project/slime/cvsroot/slime/ChangeLog	2009/03/07 10:14:42	1.1710
+++ /project/slime/cvsroot/slime/ChangeLog	2009/03/07 19:08:03	1.1711
@@ -1,5 +1,15 @@
 2009-03-08  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* slime.el (slime-choose-overlay-region): Special case :read-error
+	notes regardless of position kind.
+
+	* swank-sbcl.lisp (signal-compiler-condition): Return :READ-ERROR
+	as severity for reader-errors.
+	(compiler-note-location): Fix off-by-one when compiling from
+	buffer.
+
+2009-03-08  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	* swank-sbcl.lisp (compiling-from-buffer-p),
 	(compiling-from-file-p)
 	(compiling-from-generated-code-p): New helpers; extracted from





More information about the slime-cvs mailing list