summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorMarkus Rost <rost@math.uni-bielefeld.de>2002-05-08 18:05:28 +0000
committerMarkus Rost <rost@math.uni-bielefeld.de>2002-05-08 18:05:28 +0000
commit35679c3f5c2333cfc21b638a03f598a117c5a6c7 (patch)
tree51f9700bf3f7e58eb04f44a035645269ea03c1c4 /lisp/help-fns.el
parent2b74dd73d54075dde7dd732bea984e1a2741d7d4 (diff)
downloademacs-35679c3f5c2333cfc21b638a03f598a117c5a6c7.tar.gz
emacs-35679c3f5c2333cfc21b638a03f598a117c5a6c7.tar.bz2
emacs-35679c3f5c2333cfc21b638a03f598a117c5a6c7.zip
(describe-function-1): If the source is `loaddefs.el', look for the
real source. This is necessary only for defaliases.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e27e6fc119a..af0fa9e73a9 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -210,6 +210,19 @@ and the file name is displayed in the echo area."
(help-xref-button 1 'help-function def)))))
(or file-name
(setq file-name (symbol-file function)))
+ (when (equal file-name "loaddefs.el")
+ ;; Find the real def site of the preloaded function.
+ ;; This is necessary only for defaliases.
+ (let ((location
+ (condition-case nil
+ (find-function-search-for-symbol function nil "loaddefs.el")
+ (error nil))))
+ (when location
+ (with-current-buffer (car location)
+ (goto-char (cdr location))
+ (when (re-search-backward
+ "^;;; Generated autoloads from \\(.*\\)" nil t)
+ (setq file-name (match-string 1)))))))
(cond
(file-name
(princ " in `")