diff options
author | Martin Rudalics <rudalics@gmx.at> | 2008-01-29 17:40:19 +0000 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2008-01-29 17:40:19 +0000 |
commit | 5c8a04f1a93e11538bf895b1755465aa45e244c9 (patch) | |
tree | 69c37e5d4cae61f214eba7856f8904fdfe02b3fb /lisp/emacs-lisp | |
parent | 6f70aa334f6f388d2ea86e8e14747f6bb11e6795 (diff) | |
download | emacs-5c8a04f1a93e11538bf895b1755465aa45e244c9.tar.gz emacs-5c8a04f1a93e11538bf895b1755465aa45e244c9.tar.bz2 emacs-5c8a04f1a93e11538bf895b1755465aa45e244c9.zip |
(find-function-search-for-symbol): Strip extension
from .emacs.el to make sure symbol is searched in .emacs too.
Diffstat (limited to 'lisp/emacs-lisp')
-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 58695e95347..85f3fe941b7 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -239,8 +239,12 @@ The search is done in the source for library LIBRARY." (setq symbol (get symbol 'definition-name))) (if (string-match "\\`src/\\(.*\\.c\\)\\'" library) (find-function-C-source symbol (match-string 1 library) type) - (if (string-match "\\.el\\(c\\)\\'" library) - (setq library (substring library 0 (match-beginning 1)))) + (when (string-match "\\.el\\(c\\)\\'" library) + (setq library (substring library 0 (match-beginning 1)))) + ;; Strip extension from .emacs.el to make sure symbol is searched in + ;; .emacs too. + (when (string-match "\\.emacs\\(.el\\)" library) + (setq library (substring library 0 (match-beginning 1)))) (let* ((filename (find-library-name library)) (regexp-symbol (cdr (assq type find-function-regexp-alist)))) (with-current-buffer (find-file-noselect filename) |