changeset 88060:54e63ce02006

(find-function-search-for-symbol): Strip extension from .emacs.el to make sure symbol is searched in .emacs too.
author Martin Rudalics <rudalics@gmx.at>
date Tue, 29 Jan 2008 17:39:41 +0000
parents 256c8ed35688
children 9a83d6184f1f
files lisp/emacs-lisp/find-func.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)