Commit ca5ed196 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(describe-function-find-file): New function.

(describe-function): Use that.
parent 6f6bfb85
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment