diff options
| author | Deepak Goel | 2007-12-05 22:16:17 +0000 |
|---|---|---|
| committer | Deepak Goel | 2007-12-05 22:16:17 +0000 |
| commit | 8aa8da0595964fc0a0e5980b05afed9050031abe (patch) | |
| tree | 3fc881a1af995ad8c77e0517f52d97122f756b72 | |
| parent | b36fbf817e8bd6c2781991bccaeadb216783c72b (diff) | |
| download | emacs-8aa8da0595964fc0a0e5980b05afed9050031abe.tar.gz emacs-8aa8da0595964fc0a0e5980b05afed9050031abe.zip | |
Make `find-function' prefer ".el" over "" to fix a bug (see emacs-devel)
| -rw-r--r-- | lisp/emacs-lisp/find-func.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index b3c7c339030..24e26827f7c 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -149,10 +149,14 @@ See the functions `find-function' and `find-variable'." | |||
| 149 | ;; the same name. | 149 | ;; the same name. |
| 150 | (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library) | 150 | (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library) |
| 151 | (setq library (replace-match "" t t library))) | 151 | (setq library (replace-match "" t t library))) |
| 152 | (or (locate-file library | 152 | (or |
| 153 | (or find-function-source-path load-path) | 153 | (locate-file library |
| 154 | (append (find-library-suffixes) load-file-rep-suffixes)) | 154 | (or find-function-source-path load-path) |
| 155 | (error "Can't find library %s" library))) | 155 | (find-library-suffixes)) |
| 156 | (locate-file library | ||
| 157 | (or find-function-source-path load-path) | ||
| 158 | load-file-rep-suffixes) | ||
| 159 | (error "Can't find library %s" library))) | ||
| 156 | 160 | ||
| 157 | (defvar find-function-C-source-directory | 161 | (defvar find-function-C-source-directory |
| 158 | (let ((dir (expand-file-name "src" source-directory))) | 162 | (let ((dir (expand-file-name "src" source-directory))) |