Function: eldoc--make-callback
eldoc--make-callback is a byte-compiled function defined in
eldoc.el.gz.
Signature
(eldoc--make-callback METHOD)
Documentation
Make callback suitable for eldoc-documentation-functions.
The return value is a function FN whose lambda list is (STRING
&rest PLIST) and can be called by those functions. Its
responsibility is always to register the docstring STRING along
with options specified in PLIST as the documentation to display
for each particular situation.
METHOD specifies how the callback behaves relative to other
competing elements in eldoc-documentation-functions. It can
have the following values:
- :enthusiast says to display STRING as soon as possible if
there's no higher priority doc string;
- :patient says to display STRING along with all other
competing strings but only when all of all
eldoc-documentation-functions have been collected;
- :eager says to display STRING along with all other competing
strings so far, as soon as possible.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/eldoc.el.gz
;; JT@2020-07-08: the below docstring for the internal function
;; `eldoc--invoke-strategy' could be moved to
;; `eldoc-documentation-strategy' or thereabouts if/when we decide to
;; extend or publish the `make-callback' protocol.
(defun eldoc--make-callback (method)
"Make callback suitable for `eldoc-documentation-functions'.
The return value is a function FN whose lambda list is (STRING
&rest PLIST) and can be called by those functions. Its
responsibility is always to register the docstring STRING along
with options specified in PLIST as the documentation to display
for each particular situation.
METHOD specifies how the callback behaves relative to other
competing elements in `eldoc-documentation-functions'. It can
have the following values:
- `:enthusiast' says to display STRING as soon as possible if
there's no higher priority doc string;
- `:patient' says to display STRING along with all other
competing strings but only when all of all
`eldoc-documentation-functions' have been collected;
- `:eager' says to display STRING along with all other competing
strings so far, as soon as possible."
(funcall eldoc--make-callback method))