diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-11-01 06:23:08 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-11-01 06:23:08 +0000 |
commit | cd0cf71c4f41023a8d9c20b3a26e44b980992b5a (patch) | |
tree | b763cfec551254e2228335be4e218ed7a9a19109 /lisp/help-fns.el | |
parent | c40bb1ba81a5df164f0b9b61e3480c55808717b7 (diff) | |
parent | 895725e10c0fb68ed21abb48183cc8843bcaadf3 (diff) | |
download | emacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.tar.gz emacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.tar.bz2 emacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.zip |
Merged from miles@gnu.org--gnu-2005 (patch 142-148, 615-628)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-616
Add lisp/mh-e/.arch-inventory
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-617
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-618
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-619
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-620
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-621
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-622
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-623
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-624
Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-625
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-626
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-627
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-628
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-142
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-143
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-144
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-145
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-146
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-147
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-148
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-435
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 979ff06a307..41602f1c7a2 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -311,6 +311,19 @@ face (according to `face-differs-from-default-p')." ;; Return value is like the one from help-split-fundoc, but highlighted (cons usage doc)) +(defun describe-simplify-lib-file-name (file) + "Simplify a library name FILE to a relative name, and make it a source file." + (if file + ;; Try converting the absolute file name to a library name. + (let ((libname (file-name-nondirectory file))) + ;; Now convert that back to a file name and see if we get + ;; the original one. If so, they are equivalent. + (if (equal file (locate-file libname load-path '(""))) + (if (string-match "[.]elc?\\'" libname) + (substring libname 0 -1) + libname) + file)))) + ;;;###autoload (defun describe-function-1 (function) (let* ((def (if (symbolp function) @@ -363,6 +376,7 @@ face (according to `face-differs-from-default-p')." (help-xref-button 1 'help-function def))))) (or file-name (setq file-name (symbol-file function 'defun))) + (setq file-name (describe-simplify-lib-file-name file-name)) (when (equal file-name "loaddefs.el") ;; Find the real def site of the preloaded function. ;; This is necessary only for defaliases. @@ -537,6 +551,7 @@ it is displayed along with the global value." ;; change the format of the buffer's initial line in case ;; anything expects the current format.) (let ((file-name (symbol-file variable 'defvar))) + (setq file-name (describe-simplify-lib-file-name file-name)) (when (equal file-name "loaddefs.el") ;; Find the real def site of the preloaded variable. (let ((location |