aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-08-25 15:35:37 +0000
committerRichard M. Stallman1995-08-25 15:35:37 +0000
commitad3ec2527c2bebc632742f442cf5b3a91a3eb64c (patch)
tree5aa68c12e4116cd747b6771a033662e70ad71f9d
parentcf329c95367a5cb73c96be7dfe527a468bd83464 (diff)
downloademacs-ad3ec2527c2bebc632742f442cf5b3a91a3eb64c.tar.gz
emacs-ad3ec2527c2bebc632742f442cf5b3a91a3eb64c.zip
(describe-function): Show file name for autoloaded fns.
-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."
467 (prin1 function) 467 (prin1 function)
468 (princ ": ") 468 (princ ": ")
469 (let* ((def (symbol-function function)) 469 (let* ((def (symbol-function function))
470 file-name
470 (beg (if (commandp def) "an interactive " "a "))) 471 (beg (if (commandp def) "an interactive " "a ")))
471 (princ (cond ((or (stringp def) 472 (princ (cond ((or (stringp def)
472 (vectorp def)) 473 (vectorp def))
@@ -484,21 +485,21 @@ C-w print information on absence of warranty for GNU Emacs."
484 ((eq (car-safe def) 'mocklisp) 485 ((eq (car-safe def) 'mocklisp)
485 "a mocklisp function") 486 "a mocklisp function")
486 ((eq (car-safe def) 'autoload) 487 ((eq (car-safe def) 'autoload)
488 (setq file-name (nth 1 def))
487 (format "%s autoloaded Lisp %s" 489 (format "%s autoloaded Lisp %s"
488 (if (commandp def) "an interactive" "an") 490 (if (commandp def) "an interactive" "an")
489 (if (nth 4 def) "macro" "function") 491 (if (nth 4 def) "macro" "function")
490;;; Including the file name made this line too long.
491;;; (nth 1 def)
492 )) 492 ))
493 (t ""))) 493 (t "")))
494 (let ((file (describe-function-find-file function))) 494 (or file-name
495 (if file 495 (setq file-name (describe-function-find-file function)))
496 (progn 496 (if file-name
497 (princ " in `") 497 (progn
498 ;; We used to add .el to the file name, 498 (princ " in `")
499 ;; but that's completely wrong when the user used load-file. 499 ;; We used to add .el to the file name,
500 (princ file) 500 ;; but that's completely wrong when the user used load-file.
501 (princ "'")))) 501 (princ file-name)
502 (princ "'")))
502 (princ ".") 503 (princ ".")
503 (terpri) 504 (terpri)
504 (let ((arglist (cond ((byte-code-function-p def) 505 (let ((arglist (cond ((byte-code-function-p def)