diff options
author | Romain Francoise <romain@orebokech.com> | 2005-10-25 19:25:23 +0000 |
---|---|---|
committer | Romain Francoise <romain@orebokech.com> | 2005-10-25 19:25:23 +0000 |
commit | 53aaf457fe5bf2d432b20b136e5c5eef6365dc68 (patch) | |
tree | 7995f41baddd5c01d5f2c57da459cdd7a9232442 /lisp/emacs-lisp/find-func.el | |
parent | 8e7af2c6c5c80c3c008dc961ebb0c6b29286b579 (diff) | |
download | emacs-53aaf457fe5bf2d432b20b136e5c5eef6365dc68.tar.gz |
(find-library-name): Also strip extension if library name ends in .el,
to take advantage of `find-library-suffixes'.
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 0cebeeb6f7f..2f394c2c470 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -142,9 +142,9 @@ See the functions `find-function' and `find-variable'." (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) |