If the Lisp system provides a snippet hint for a source location,
`slime-goto-source-location' uses `slime-isearch' to find the nearest
occurrence of it in order to narrow down the location better, and
subsequently uses `slime-search-call-site' to narrow it down even
further. However, the search may send the point off into some random
place in the file, even in a completely different defun, but then
`slime-search-call-site' narrows itself to whichever defun it's on and
searches *there*, so if `slime-isearch' got lost then the whole thing
will get lost.
Is there a reason that `slime-goto-source-location' does not narrow to
the defun before running `slime-isearch'? The above problem is solved
by this simple patch:
Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.605
diff -u -r1.605 slime.el
--- slime.el 26 Mar 2006 03:51:56 -0000 1.605
+++ slime.el 30 Mar 2006 23:51:34 -0000
@@ -5043,7 +5043,9 @@
(slime-goto-location-buffer buffer)
(slime-goto-location-position position)
(when-let (snippet (getf hints :snippet))
- (slime-isearch snippet))
+ (save-restriction
+ (narrow-to-defun)
+ (slime-isearch snippet)))
(when-let (fname (getf hints :call-site))
(slime-search-call-site fname)))
((:error message)