]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-function-search-for-symbol): Strip extension
authorMartin Rudalics <rudalics@gmx.at>
Tue, 29 Jan 2008 17:40:19 +0000 (17:40 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 29 Jan 2008 17:40:19 +0000 (17:40 +0000)
from .emacs.el to make sure symbol is searched in .emacs too.

lisp/ChangeLog
lisp/emacs-lisp/find-func.el

index 5c68efb5298a395cdbf2d368b81eccc30722a5cd..d35253982655de382bc67a856d2ba00dd93c8f0b 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-29  Martin Rudalics  <rudalics@gmx.at>
+
+       * 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  <tassilo@member.fsf.org>
 
        * doc-view.el (doc-view-mode): Use facilities below to
index 58695e95347f878e0292f4108832844aa4503e16..85f3fe941b7f6753da4e4d379ca529e05bb61fb6 100644 (file)
@@ -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)