[slime-cvs] CVS slime
trittweiler
trittweiler at common-lisp.net
Thu Feb 21 12:55:58 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv22544
Modified Files:
slime.el
Log Message:
Fix regressions in the `find-definition' test case on SBCL:
M-. on e.g. SWANK::READ-FROM-EMACS would bring the user to
(|defun read-from-emacs ...)
and not
|(defun read-from-emacs ...)
* swank-sbcl.lisp (source-file-position): Don't 1+ the returned
position; i.e. return a position usable as a CL /file position/
which start from 0, and not a position usable in Emacs where
buffer points start from 1. This is important because the return
value is passed to SWANK-BACKEND::READ-SNIPPET which invokes
CL:FILE-POSITION on it.
(make-definition-source-location): Adapted to 1+ the position
passed to Emacs, to reflect above change.
--- /project/slime/cvsroot/slime/slime.el 2008/02/20 22:12:37 1.906
+++ /project/slime/cvsroot/slime/slime.el 2008/02/21 12:55:57 1.907
@@ -5189,11 +5189,19 @@
(slime-alistify xrefs
(lambda (x)
(if (slime-xref-has-location-p x)
- (cadr
- (slime-location.buffer (slime-xref.location x)))
+ (slime-location-to-string (slime-xref.location x))
"Error"))
#'equal)))
+(defun slime-location-to-string (location)
+ (destructure-case (slime-location.buffer location)
+ ((:file filename) filename)
+ ((:buffer bufname)
+ (let ((buffer (get-buffer bufname)))
+ (if buffer
+ (format "%S" buffer) ; "#<buffer foo.lisp>"
+ (format "%s (previously existing buffer)" bufname))))))
+
(defun slime-pop-to-location (location &optional where)
(ecase where
((nil)
More information about the slime-cvs
mailing list