[slime-devel] window-point vs buffer point: making slime-goto-next-xref work

Daniel Barlow dan at telent.net
Thu Dec 11 06:59:22 UTC 2003


I don't know enough about emacs internals to explain why, but on my
"GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2002-03-22 on raven, modified by Debian", I need the attached patch
to make slime-goto-next-xref actually move the cursor in the xref
buffer: without it, I never get past the first xref.

Does it work for other people?  I notice that there's no keybinding
for slime-goto-next-xref or slime-next-location which usually calls
it, so I could understand if it hadn't been tested.  Or then again,
maybe my setup is weird.  Anyone want to take a stab at explaining?

Two other points, seeing as I'm here -

 - pretty(ish) picture of SLIME building an ASDF system, via
<URL:http://ww.telent.net/diary/2003/12/#11.16680>.

 - we have a problem with source path parsing which causes slime to be
   unable to compile Marty Hall's Memoization package.  I've just
   checked in the relevant function as b0rk.lisp: try C-c C-k on 
   this and (at least in SBCL) you get 

READER-ERROR at 1120 (line 28, column 36) on #<FILE-STREAM
                                               for "file \"/home/dan/src/cl.net/slime/b0rk.lisp\""
                                               {9BD6389}>:
unmatched close parenthesis

   which is clearly not the case.  I suspect #' is confusing it, but
   I'm going to bed now anyway

Enjoy

Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.139
diff -u -w -r1.139 slime.el
--- slime.el    11 Dec 2003 04:57:33 -0000      1.139
+++ slime.el    11 Dec 2003 06:12:07 -0000
@@ -3331,9 +3331,10 @@
 (defun slime-goto-next-xref ()
   "Goto the next cross-reference location."
   (let ((location (with-current-buffer (slime-xref-buffer)
-                    (display-buffer (current-buffer) t)
-                    (goto-char (next-single-char-property-change 
-                                (point) 'slime-location))
+                    (let ((w (display-buffer (current-buffer) t)))
+                      (goto-char (1+ (next-single-char-property-change 
+                                      (point) 'slime-location)))
+                      (set-window-point w (point)))
                     (cond ((eobp)
                            (message "No more xrefs.")
                            nil)



-dan

-- 

 http://web.metacircles.com/ - Open Source software development and support
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20031211/8b25830b/attachment.sig>


More information about the slime-devel mailing list