unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6716: 23.2; Setting `find-function-source-path' has no effect.
@ 2010-07-24 11:56 Štěpán Němec
  2010-07-25 23:45 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Štěpán Němec @ 2010-07-24 11:56 UTC (permalink / raw)
  To: 6716


Because `find-library-name' receives as its LIBRARY argument the full
path, but doesn't strip the directory part, setting
`find-function-source-path' has no effect on symbol finding -- Emacs
still tries the path guessed according to load path (which is not
correct in case you have the Elisp sources in directory different from
the compiled files).

This simple change seems to fix it for me:

diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 216d91b..f704c63 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -150,10 +150,10 @@ (defun find-library-name (library)
   (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
       (setq library (replace-match "" t t library)))
   (or 
-   (locate-file library
+   (locate-file (file-name-nondirectory library)
 		(or find-function-source-path load-path)
 		(find-library-suffixes))
-   (locate-file library
+   (locate-file (file-name-nondirectory library)
 		(or find-function-source-path load-path)
 		load-file-rep-suffixes)
    (error "Can't find library %s" library)))


Regards,

  Štěpán





^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-02-17 11:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-24 11:56 bug#6716: 23.2; Setting `find-function-source-path' has no effect Štěpán Němec
2010-07-25 23:45 ` Stefan Monnier
2010-07-26  4:17   ` Štěpán Němec
2010-07-26  4:51     ` Štěpán Němec
2010-07-26 10:23     ` Stefan Monnier
2010-07-26 11:20       ` Štěpán Němec
2010-07-26 21:44         ` Stefan Monnier
2010-07-27 10:07           ` Štěpán Němec
2010-07-27 11:57             ` Stefan Monnier
2010-07-26 21:40 ` MON KEY
2010-07-27  9:39   ` Štěpán Němec
2010-07-28  1:38     ` MON KEY
2022-02-13 10:02 ` Lars Ingebrigtsen
2022-02-15 14:50   ` Štěpán Němec
2022-02-17 11:33     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).