[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Sat Mar 7 21:12:34 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv11076
Modified Files:
ChangeLog slime.el
Log Message:
* slime.el (slime-choose-overlay-for-read-error): Extraced and
extended from `slime-choose-overlay-region'. Differentiate between
symbol-related reader-errors (package not found &c) and
character-related reader-errors.
(slime-choose-overlay-region): Use it.
--- /project/slime/cvsroot/slime/ChangeLog 2009/03/07 19:29:43 1.1712
+++ /project/slime/cvsroot/slime/ChangeLog 2009/03/07 21:12:33 1.1713
@@ -1,5 +1,13 @@
2009-03-08 Tobias C. Rittweiler <tcr at freebits.de>
+ * slime.el (slime-choose-overlay-for-read-error): Extraced and
+ extended from `slime-choose-overlay-region'. Differentiate between
+ symbol-related reader-errors (package not found &c) and
+ character-related reader-errors.
+ (slime-choose-overlay-region): Use it.
+
+2009-03-08 Tobias C. Rittweiler <tcr at freebits.de>
+
* slime.el (make-slime-buffer-location, make-slime-file-location):
Do not default to (:hints), but to nil, as expected in the
slime-side source-location machinery.
--- /project/slime/cvsroot/slime/slime.el 2009/03/07 19:29:42 1.1145
+++ /project/slime/cvsroot/slime/slime.el 2009/03/07 21:12:33 1.1146
@@ -3007,10 +3007,20 @@
((:location file pos _hints)
(cond ((eq (car file) ':source-form) nil)
((eq (slime-note.severity note) :read-error)
- (let ((pos (slime-location-offset location)))
- (values pos (1+ pos))))
+ (slime-choose-overlay-for-read-error location))
(t
(slime-choose-overlay-for-sexp location))))))))
+
+(defun slime-choose-overlay-for-read-error (location)
+ (let ((pos (slime-location-offset location)))
+ (save-excursion
+ (goto-char pos)
+ (let ((symbol (slime-symbol-at-point)))
+ (if symbol
+ ;; package not found, &c.
+ (values (slime-symbol-start-pos) (slime-symbol-end-pos))
+ ;; comma not inside backquote, unmatched right parenthesis, &c.
+ (values pos (1+ pos)))))))
(defun slime-choose-overlay-for-sexp (location)
(slime-goto-source-location location)
More information about the slime-cvs
mailing list