aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2008-01-29 17:40:19 +0000
committerMartin Rudalics2008-01-29 17:40:19 +0000
commit5c8a04f1a93e11538bf895b1755465aa45e244c9 (patch)
tree69c37e5d4cae61f214eba7856f8904fdfe02b3fb
parent6f70aa334f6f388d2ea86e8e14747f6bb11e6795 (diff)
downloademacs-5c8a04f1a93e11538bf895b1755465aa45e244c9.tar.gz
emacs-5c8a04f1a93e11538bf895b1755465aa45e244c9.zip
(find-function-search-for-symbol): Strip extension
from .emacs.el to make sure symbol is searched in .emacs too.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/find-func.el8
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 @@
12008-01-29 Martin Rudalics <rudalics@gmx.at>
2
3 * emacs-lisp/find-func.el (find-function-search-for-symbol):
4 Strip extension from .emacs.el to make sure symbol is searched
5 in .emacs too.
6
12008-01-29 Tassilo Horn <tassilo@member.fsf.org> 72008-01-29 Tassilo Horn <tassilo@member.fsf.org>
2 8
3 * doc-view.el (doc-view-mode): Use facilities below to 9 * 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."
239 (setq symbol (get symbol 'definition-name))) 239 (setq symbol (get symbol 'definition-name)))
240 (if (string-match "\\`src/\\(.*\\.c\\)\\'" library) 240 (if (string-match "\\`src/\\(.*\\.c\\)\\'" library)
241 (find-function-C-source symbol (match-string 1 library) type) 241 (find-function-C-source symbol (match-string 1 library) type)
242 (if (string-match "\\.el\\(c\\)\\'" library) 242 (when (string-match "\\.el\\(c\\)\\'" library)
243 (setq library (substring library 0 (match-beginning 1)))) 243 (setq library (substring library 0 (match-beginning 1))))
244 ;; Strip extension from .emacs.el to make sure symbol is searched in
245 ;; .emacs too.
246 (when (string-match "\\.emacs\\(.el\\)" library)
247 (setq library (substring library 0 (match-beginning 1))))
244 (let* ((filename (find-library-name library)) 248 (let* ((filename (find-library-name library))
245 (regexp-symbol (cdr (assq type find-function-regexp-alist)))) 249 (regexp-symbol (cdr (assq type find-function-regexp-alist))))
246 (with-current-buffer (find-file-noselect filename) 250 (with-current-buffer (find-file-noselect filename)