From 5c8a04f1a93e11538bf895b1755465aa45e244c9 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 29 Jan 2008 17:40:19 +0000 Subject: [PATCH] (find-function-search-for-symbol): Strip extension from .emacs.el to make sure symbol is searched in .emacs too. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/find-func.el | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c68efb5298..d3525398265 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-01-29 Martin Rudalics + + * emacs-lisp/find-func.el (find-function-search-for-symbol): + Strip extension from .emacs.el to make sure symbol is searched + in .emacs too. + 2008-01-29 Tassilo Horn * doc-view.el (doc-view-mode): Use facilities below to 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) -- 2.39.5