diff options
| -rw-r--r-- | lisp/emacs-lisp/find-func.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 9fe700d9b7f..2022d3ab7d4 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -231,8 +231,12 @@ The search is done in the source for library LIBRARY." | |||
| 231 | (setq symbol (get symbol 'definition-name))) | 231 | (setq symbol (get symbol 'definition-name))) |
| 232 | (if (string-match "\\`src/\\(.*\\.c\\)\\'" library) | 232 | (if (string-match "\\`src/\\(.*\\.c\\)\\'" library) |
| 233 | (find-function-C-source symbol (match-string 1 library) type) | 233 | (find-function-C-source symbol (match-string 1 library) type) |
| 234 | (if (string-match "\\.el\\(c\\)\\'" library) | 234 | (when (string-match "\\.el\\(c\\)\\'" library) |
| 235 | (setq library (substring library 0 (match-beginning 1)))) | 235 | (setq library (substring library 0 (match-beginning 1)))) |
| 236 | ;; Strip extension from .emacs.el to make sure symbol is searched in | ||
| 237 | ;; .emacs too. | ||
| 238 | (when (string-match "\\.emacs\\(.el\\)" library) | ||
| 239 | (setq library (substring library 0 (match-beginning 1)))) | ||
| 236 | (let* ((filename (find-library-name library)) | 240 | (let* ((filename (find-library-name library)) |
| 237 | (regexp-symbol (cdr (assq type find-function-regexp-alist)))) | 241 | (regexp-symbol (cdr (assq type find-function-regexp-alist)))) |
| 238 | (with-current-buffer (find-file-noselect filename) | 242 | (with-current-buffer (find-file-noselect filename) |