bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6716: 23.2; Setting `find-function-source-path' has no effect.


From: Štěpán Němec
Subject: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
Date: Sat, 24 Jul 2010 13:56:41 +0200

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]