Variable: eldoc-documentation-strategy

eldoc-documentation-strategy is a customizable variable defined in eldoc.el.gz.

Value

eldoc-documentation-default

Documentation

How to collect and display results of eldoc-documentation-functions.

This variable controls how to call the functions in the special hook eldoc-documentation-functions, and how to organize their results for display to the user. The functions in eldoc-documentation-functions are the source of documentation, and act as back-end for ElDoc.

The following values are supported:

- eldoc-documentation-default: Call functions in the special
  hook in order, until one of them returns a non-nil string
  value. Display only that string.

- eldoc-documentation-compose: Call all the functions in the
  special hook and display all of the resulting strings together,
  after all of the functions were called, and in the order of the
  functions in the hook.

- eldoc-documentation-compose-eagerly: Call all the functions in
  the special hook, and display each non-nil string as soon as it
  is returned by a function, before calling the next function.

- eldoc-documentation-enthusiast: Call all the functions in the
  special hook, and display only the most important resulting
  string at any given time. A function appearing first in
  the special hook is considered more important than those which
  appear after it.

This variable can also be set to a function of no arguments that returns something other than a string or nil, and allows for some or all of the special hook eldoc-documentation-functions to be run. In that case, the strategy function should follow that other variable's protocol closely and display the resulting doc strings itself.

For backward compatibility with the "old" protocol, this variable can also be set to a function that returns nil or a doc string, depending whether or not there is documentation to display at all.

This variable was added, or its default value changed, in Emacs 28.1.

View in manual

Probably introduced at or before Emacs version 28.1.

Aliases

eldoc-documentation-function

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eldoc.el.gz
(eldoc--documentation-strategy-defcustom eldoc-documentation-strategy
    eldoc-documentation-function
  #'eldoc-documentation-default
  "How to collect and display results of `eldoc-documentation-functions'.

This variable controls how to call the functions in the special hook
`eldoc-documentation-functions', and how to organize their results
for display to the user.  The functions in `eldoc-documentation-functions'
are the source of documentation, and act as back-end for ElDoc.

The following values are supported:

- `eldoc-documentation-default': Call functions in the special
  hook in order, until one of them returns a non-nil string
  value.  Display only that string.

- `eldoc-documentation-compose': Call all the functions in the
  special hook and display all of the resulting strings together,
  after all of the functions were called, and in the order of the
  functions in the hook.

- `eldoc-documentation-compose-eagerly': Call all the functions in
  the special hook, and display each non-nil string as soon as it
  is returned by a function, before calling the next function.

- `eldoc-documentation-enthusiast': Call all the functions in the
  special hook, and display only the most important resulting
  string at any given time.  A function appearing first in
  the special hook is considered more important than those which
  appear after it.

This variable can also be set to a function of no arguments that
returns something other than a string or nil, and allows for some
or all of the special hook `eldoc-documentation-functions' to be
run.  In that case, the strategy function should follow that
other variable's protocol closely and display the resulting doc
strings itself.

For backward compatibility with the \"old\" protocol, this variable
can also be set to a function that returns nil or a doc string,
depending whether or not there is documentation to display at
all."
  :link '(info-link "(emacs) Lisp Doc")
  :type '(radio (function-item eldoc-documentation-default)
                (function-item eldoc-documentation-compose)
                (function-item eldoc-documentation-compose-eagerly)
                (function-item eldoc-documentation-enthusiast)
                (function :tag "Other function"))
  :version "28.1")