Function: eldoc-doc-buffer

eldoc-doc-buffer is an interactive and byte-compiled function defined in eldoc.el.gz.

Signature

(eldoc-doc-buffer &optional INTERACTIVE)

Documentation

Get or display ElDoc documentation buffer.

The buffer holds the results of the last documentation request. If INTERACTIVE, display it. Else, return said buffer.

View in manual

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eldoc.el.gz
(defun eldoc-doc-buffer (&optional interactive)
  "Get or display ElDoc documentation buffer.

The buffer holds the results of the last documentation request.
If INTERACTIVE, display it.  Else, return said buffer."
  (interactive (list t))
  (unless (buffer-live-p eldoc--doc-buffer)
    (user-error (format
                 "ElDoc buffer doesn't exist, maybe `%s' to produce one."
                 (substitute-command-keys "\\[eldoc]"))))
  (with-current-buffer eldoc--doc-buffer
    (cond (interactive
           (rename-buffer (replace-regexp-in-string "^ *" ""
                                                    (buffer-name)))
           (display-buffer (current-buffer)))
          (t (current-buffer)))))