summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-08-25 15:35:37 +0000
committerRichard M. Stallman <rms@gnu.org>1995-08-25 15:35:37 +0000
commit3cae3ac2bbd7627f6d6e410faf664fa04e5c0ab3 (patch)
tree17246513bd9244d1d70b292f4c738d0b0a5bf973 /lisp/help.el
parentd6268ef501085d36aeeaa0f6c929e72082202b59 (diff)
downloademacs-3cae3ac2bbd7627f6d6e410faf664fa04e5c0ab3.tar.gz
(describe-function): Show file name for autoloaded fns.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 7aa5a0586a5..213e1b16eed 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -467,6 +467,7 @@ C-w print information on absence of warranty for GNU Emacs."
(prin1 function)
(princ ": ")
(let* ((def (symbol-function function))
+ file-name
(beg (if (commandp def) "an interactive " "a ")))
(princ (cond ((or (stringp def)
(vectorp def))
@@ -484,21 +485,21 @@ C-w print information on absence of warranty for GNU Emacs."
((eq (car-safe def) 'mocklisp)
"a mocklisp function")
((eq (car-safe def) 'autoload)
+ (setq file-name (nth 1 def))
(format "%s autoloaded Lisp %s"
(if (commandp def) "an interactive" "an")
(if (nth 4 def) "macro" "function")
-;;; Including the file name made this line too long.
-;;; (nth 1 def)
))
(t "")))
- (let ((file (describe-function-find-file function)))
- (if file
- (progn
- (princ " in `")
- ;; We used to add .el to the file name,
- ;; but that's completely wrong when the user used load-file.
- (princ file)
- (princ "'"))))
+ (or file-name
+ (setq file-name (describe-function-find-file function)))
+ (if file-name
+ (progn
+ (princ " in `")
+ ;; We used to add .el to the file name,
+ ;; but that's completely wrong when the user used load-file.
+ (princ file-name)
+ (princ "'")))
(princ ".")
(terpri)
(let ((arglist (cond ((byte-code-function-p def)