[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102698: * help-fns.el (find-lisp-obj
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102698: * help-fns.el (find-lisp-object-file-name): Locate .emacs from .emacs.elc (Bug#7530). |
Date: |
Tue, 21 Dec 2010 14:45:11 +0800 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102698
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Tue 2010-12-21 14:45:11 +0800
message:
* help-fns.el (find-lisp-object-file-name): Locate .emacs from .emacs.elc
(Bug#7530).
modified:
lisp/ChangeLog
lisp/help-fns.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-12-21 02:36:48 +0000
+++ b/lisp/ChangeLog 2010-12-21 06:45:11 +0000
@@ -1,5 +1,8 @@
2010-12-21 Chong Yidong <address@hidden>
+ * help-fns.el (find-lisp-object-file-name): Locate .emacs from
+ .emacs.elc (Bug#7530).
+
* wid-edit.el (widget-image-find): Remove bogus :ascent spec from
image spec (Bug#7480).
=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el 2010-10-23 02:46:06 +0000
+++ b/lisp/help-fns.el 2010-12-21 06:45:11 +0000
@@ -289,13 +289,19 @@
((not (stringp file-name))
;; If we don't have a file-name string by now, we lost.
nil)
+ ;; Now, `file-name' should have become an absolute file name.
+ ;; For files loaded from ~/.emacs.elc, try ~/.emacs.
+ ((let (fn)
+ (and (string-equal file-name
+ (expand-file-name ".emacs.elc" "~"))
+ (file-readable-p (setq fn (expand-file-name ".emacs" "~")))
+ fn)))
+ ;; When the Elisp source file can be found in the install
+ ;; directory, return the name of that file.
((let ((lib-name
(if (string-match "[.]elc\\'" file-name)
(substring-no-properties file-name 0 -1)
file-name)))
- ;; When the Elisp source file can be found in the install
- ;; directory return the name of that file - `file-name' should
- ;; have become an absolute file name ny now.
(or (and (file-readable-p lib-name) lib-name)
;; The library might be compressed.
(and (file-readable-p (concat lib-name ".gz")) lib-name))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102698: * help-fns.el (find-lisp-object-file-name): Locate .emacs from .emacs.elc (Bug#7530).,
Chong Yidong <=