aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-02-14 00:05:26 -0800
committerGlenn Morris2013-02-14 00:05:26 -0800
commit6a378d89c52530744c24bc92342904347331b758 (patch)
treeb802c85b669d39bd125742bf085ce9abbf153de4
parent3ca2c0150d5e482b62d368cf1633ff1587af6ce0 (diff)
downloademacs-6a378d89c52530744c24bc92342904347331b758.tar.gz
emacs-6a378d89c52530744c24bc92342904347331b758.zip
* help-fns.el (find-lisp-object-file-name): Give special treatment
to all ~/.foo.elc files, not just ~/.emacs. Fixes: debbugs:9007
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/help-fns.el12
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 362567cbe41..cb3f0fcc978 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-02-14 Glenn Morris <rgm@gnu.org>
2
3 * help-fns.el (find-lisp-object-file-name): Give special treatment
4 to all ~/.foo.elc files, not just ~/.emacs. (Bug#9007)
5
12013-02-14 David Biesack <sasdjb@d72933.na.sas.com> (tiny change) 62013-02-14 David Biesack <sasdjb@d72933.na.sas.com> (tiny change)
2 7
3 * net/quickurl.el (quickurl-save-urls): 8 * net/quickurl.el (quickurl-save-urls):
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 178096d1024..bdf86016844 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -336,11 +336,15 @@ suitable file is found, return nil."
336 ;; If we don't have a file-name string by now, we lost. 336 ;; If we don't have a file-name string by now, we lost.
337 nil) 337 nil)
338 ;; Now, `file-name' should have become an absolute file name. 338 ;; Now, `file-name' should have become an absolute file name.
339 ;; For files loaded from ~/.emacs.elc, try ~/.emacs. 339 ;; For files loaded from ~/.foo.elc, try ~/.foo.
340 ;; This applies to config files like ~/.emacs,
341 ;; which people sometimes compile.
340 ((let (fn) 342 ((let (fn)
341 (and (string-equal file-name 343 (and (string-match "\\`\\..*\\.elc\\'"
342 (expand-file-name ".emacs.elc" "~")) 344 (file-name-nondirectory file-name))
343 (file-readable-p (setq fn (expand-file-name ".emacs" "~"))) 345 (string-equal (file-name-directory file-name)
346 (file-name-as-directory (expand-file-name "~")))
347 (file-readable-p (setq fn (file-name-sans-extension file-name)))
344 fn))) 348 fn)))
345 ;; When the Elisp source file can be found in the install 349 ;; When the Elisp source file can be found in the install
346 ;; directory, return the name of that file. 350 ;; directory, return the name of that file.