# HG changeset patch # User Martin Rudalics # Date 1201628381 0 # Node ID 54e63ce02006cde3b52104f78b75517f59465441 # Parent 256c8ed356888385ba0c851941520df8b102a21a (find-function-search-for-symbol): Strip extension from .emacs.el to make sure symbol is searched in .emacs too. diff -r 256c8ed35688 -r 54e63ce02006 lisp/emacs-lisp/find-func.el --- a/lisp/emacs-lisp/find-func.el Tue Jan 29 13:50:35 2008 +0000 +++ b/lisp/emacs-lisp/find-func.el Tue Jan 29 17:39:41 2008 +0000 @@ -239,8 +239,12 @@ (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)