Mercurial > emacs
changeset 9639:7cad0025f303
(describe-function-find-file): New function.
(describe-function): Use that.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 21 Oct 1994 19:42:50 +0000 |
parents | e77a0d87d792 |
children | 7f70a4773d5e |
files | lisp/help.el |
diffstat | 1 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help.el Fri Oct 21 19:37:36 1994 +0000 +++ b/lisp/help.el Fri Oct 21 19:42:50 1994 +0000 @@ -369,6 +369,15 @@ (and (symbolp obj) (fboundp obj) obj))) (error nil)))) +(defun describe-function-find-file (function) + (let ((files load-history) + file functions) + (while files + (if (memq function (cdr (car files))) + (setq file (car (car files)) files nil)) + (setq files (cdr files))) + file)) + (defun describe-function (function) "Display the full documentation of FUNCTION (a symbol)." (interactive @@ -409,11 +418,12 @@ ;;; (nth 1 def) )) (t ""))) - (if (get function 'autoload) - (progn - (princ " in the `") - (princ (car (get function 'autoload))) - (princ "' package"))) + (let ((file (describe-function-find-file function))) + (if file + (progn + (princ " in `") + (princ file) + (princ ".el'")))) (princ ".") (terpri) (let ((arglist (cond ((byte-code-function-p def)