aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-21 19:42:50 +0000
committerRichard M. Stallman1994-10-21 19:42:50 +0000
commitca5ed1961697da6142c2e015b568f82499a176f0 (patch)
treea2e92ed01bcbf72732ccb902334cab1fb09ae94a
parent6f6bfb857335d7a7d0edb23a3303f01e8be04755 (diff)
downloademacs-ca5ed1961697da6142c2e015b568f82499a176f0.tar.gz
emacs-ca5ed1961697da6142c2e015b568f82499a176f0.zip
(describe-function-find-file): New function.
(describe-function): Use that.
-rw-r--r--lisp/help.el20
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/help.el b/lisp/help.el
index b2172fb91e2..2845ad96412 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -369,6 +369,15 @@ C-w print information on absence of warranty for GNU Emacs."
369 (and (symbolp obj) (fboundp obj) obj))) 369 (and (symbolp obj) (fboundp obj) obj)))
370 (error nil)))) 370 (error nil))))
371 371
372(defun describe-function-find-file (function)
373 (let ((files load-history)
374 file functions)
375 (while files
376 (if (memq function (cdr (car files)))
377 (setq file (car (car files)) files nil))
378 (setq files (cdr files)))
379 file))
380
372(defun describe-function (function) 381(defun describe-function (function)
373 "Display the full documentation of FUNCTION (a symbol)." 382 "Display the full documentation of FUNCTION (a symbol)."
374 (interactive 383 (interactive
@@ -409,11 +418,12 @@ C-w print information on absence of warranty for GNU Emacs."
409;;; (nth 1 def) 418;;; (nth 1 def)
410 )) 419 ))
411 (t ""))) 420 (t "")))
412 (if (get function 'autoload) 421 (let ((file (describe-function-find-file function)))
413 (progn 422 (if file
414 (princ " in the `") 423 (progn
415 (princ (car (get function 'autoload))) 424 (princ " in `")
416 (princ "' package"))) 425 (princ file)
426 (princ ".el'"))))
417 (princ ".") 427 (princ ".")
418 (terpri) 428 (terpri)
419 (let ((arglist (cond ((byte-code-function-p def) 429 (let ((arglist (cond ((byte-code-function-p def)