changeset 66446:7e631d51e6e3

(find-library-name): Also strip extension if library name ends in .el, to take advantage of `find-library-suffixes'.
author Romain Francoise <romain@orebokech.com>
date Tue, 25 Oct 2005 19:25:23 +0000
parents 5545a7411e26
children a43c1be1aaa4
files lisp/ChangeLog lisp/emacs-lisp/find-func.el
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Oct 25 19:20:22 2005 +0000
+++ b/lisp/ChangeLog	Tue Oct 25 19:25:23 2005 +0000
@@ -1,3 +1,9 @@
+2005-10-25  Romain Francoise  <romain@orebokech.com>
+
+	* emacs-lisp/find-func.el (find-library-name): Also strip
+	extension if library name ends in .el, to take advantage of
+	`find-library-suffixes'.
+
 2005-10-25  Richard M. Stallman  <rms@gnu.org>
 
 	* menu-bar.el (menu-bar-help-menu): Say which kind of therapist.
--- a/lisp/emacs-lisp/find-func.el	Tue Oct 25 19:20:22 2005 +0000
+++ b/lisp/emacs-lisp/find-func.el	Tue Oct 25 19:25:23 2005 +0000
@@ -142,9 +142,9 @@
 
 (defun find-library-name (library)
   "Return the absolute file name of the Lisp source of LIBRARY."
-  ;; If the library is byte-compiled, try to find a source library by
-  ;; the same name.
-  (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
+  ;; Strip off the extension to take advantage of library suffixes in
+  ;; the call to `locate-file'.
+  (if (string-match "\\.el\\(c\\(\\..*\\)?\\)?\\'" library)
       (setq library (replace-match "" t t library)))
   (or (locate-file library
 		   (or find-function-source-path load-path)