diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-21 19:42:50 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-21 19:42:50 +0000 |
commit | d664ae54e375f811036ebc6998ff2b13539b1b4a (patch) | |
tree | 9e4007dd7fffe10335d2165e7ec7a474067a769e /lisp/help.el | |
parent | 84dc11b15f33cfc3102a9bb20bf6c971208fde45 (diff) | |
download | emacs-d664ae54e375f811036ebc6998ff2b13539b1b4a.tar.gz |
(describe-function-find-file): New function.
(describe-function): Use that.
Diffstat (limited to 'lisp/help.el')
-rw-r--r-- | lisp/help.el | 20 |
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." (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 @@ C-w print information on absence of warranty for GNU Emacs." ;;; (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) |