Function: describe-function
describe-function is an autoloaded, interactive and byte-compiled
function defined in help-fns.el.gz.
Signature
(describe-function FUNCTION)
Documentation
Display the full documentation of FUNCTION (a symbol).
When called from Lisp, FUNCTION may also be a function object.
See the help-enable-symbol-autoload variable for special
handling of autoloaded functions.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/help-fns.el.gz
;;;###autoload
(defun describe-function (function)
"Display the full documentation of FUNCTION (a symbol).
When called from Lisp, FUNCTION may also be a function object.
See the `help-enable-symbol-autoload' variable for special
handling of autoloaded functions."
(interactive (help-fns--describe-function-or-command-prompt))
;; We save describe-function-orig-buffer on the help xref stack, so
;; it is restored by the back/forward buttons. 'help-buffer'
;; expects (current-buffer) to be a help buffer when processing
;; those buttons, so we can't change the current buffer before
;; calling that.
(let ((describe-function-orig-buffer
(or describe-function-orig-buffer
(current-buffer)))
(help-buffer-under-preparation t))
(help-setup-xref (list #'describe-function--helper
function describe-function-orig-buffer)
(called-interactively-p 'interactive))
(save-excursion
(with-help-window (help-buffer)
(if (get function 'reader-construct)
(princ function)
(prin1 function))
;; Use " is " instead of a colon so that
;; it is easier to get out the function name using forward-sexp.
(princ " is ")
(describe-function-1 function)
(with-current-buffer standard-output
;; Return the text we displayed.
(buffer-string))))))