]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-function-search-for-symbol): Strip extension from .emacs.el to
authorChong Yidong <cyd@stupidchicken.com>
Mon, 31 Mar 2008 22:12:22 +0000 (22:12 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 31 Mar 2008 22:12:22 +0000 (22:12 +0000)
make sure symbol is searched in .emacs too.

lisp/emacs-lisp/find-func.el

index 9fe700d9b7f7a4103e38fd3694eba36e9da7f1c9..2022d3ab7d41941dc9cc12a3ab2a242f4dfd2207 100644 (file)
@@ -231,8 +231,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)