diff options
| author | Romain Francoise | 2005-10-25 19:25:23 +0000 |
|---|---|---|
| committer | Romain Francoise | 2005-10-25 19:25:23 +0000 |
| commit | 53aaf457fe5bf2d432b20b136e5c5eef6365dc68 (patch) | |
| tree | 7995f41baddd5c01d5f2c57da459cdd7a9232442 | |
| parent | 8e7af2c6c5c80c3c008dc961ebb0c6b29286b579 (diff) | |
| download | emacs-53aaf457fe5bf2d432b20b136e5c5eef6365dc68.tar.gz emacs-53aaf457fe5bf2d432b20b136e5c5eef6365dc68.zip | |
(find-library-name): Also strip extension if library name ends in .el,
to take advantage of `find-library-suffixes'.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/find-func.el | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a904cee7943..71c8ee24b6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2005-10-25 Romain Francoise <romain@orebokech.com> | ||
| 2 | |||
| 3 | * emacs-lisp/find-func.el (find-library-name): Also strip | ||
| 4 | extension if library name ends in .el, to take advantage of | ||
| 5 | `find-library-suffixes'. | ||
| 6 | |||
| 1 | 2005-10-25 Richard M. Stallman <rms@gnu.org> | 7 | 2005-10-25 Richard M. Stallman <rms@gnu.org> |
| 2 | 8 | ||
| 3 | * menu-bar.el (menu-bar-help-menu): Say which kind of therapist. | 9 | * menu-bar.el (menu-bar-help-menu): Say which kind of therapist. |
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'." | |||
| 142 | 142 | ||
| 143 | (defun find-library-name (library) | 143 | (defun find-library-name (library) |
| 144 | "Return the absolute file name of the Lisp source of LIBRARY." | 144 | "Return the absolute file name of the Lisp source of LIBRARY." |
| 145 | ;; If the library is byte-compiled, try to find a source library by | 145 | ;; Strip off the extension to take advantage of library suffixes in |
| 146 | ;; the same name. | 146 | ;; the call to `locate-file'. |
| 147 | (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library) | 147 | (if (string-match "\\.el\\(c\\(\\..*\\)?\\)?\\'" library) |
| 148 | (setq library (replace-match "" t t library))) | 148 | (setq library (replace-match "" t t library))) |
| 149 | (or (locate-file library | 149 | (or (locate-file library |
| 150 | (or find-function-source-path load-path) | 150 | (or find-function-source-path load-path) |