Function: eldoc-documentation-compose

eldoc-documentation-compose is a byte-compiled function defined in eldoc.el.gz.

Signature

(eldoc-documentation-compose)

Documentation

Show multiple documentation strings together after waiting for all of them.

This is meant to be used as a value for eldoc-documentation-strategy.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eldoc.el.gz
(defun eldoc-documentation-compose ()
  "Show multiple documentation strings together after waiting for all of them.
This is meant to be used as a value for `eldoc-documentation-strategy'."
  (let (fns-and-callbacks)
    ;; Make all the callbacks, setting up state inside
    ;; `eldoc--invoke-strategy' to know how many callbacks to wait for
    ;; before displaying the result (bug#62816).
    (run-hook-wrapped 'eldoc-documentation-functions
                      (lambda (f)
                        (push (cons f (eldoc--make-callback :patient f))
                              fns-and-callbacks)
                        nil))
    ;; Now call them.  The last one will trigger the display.
    (cl-loop for (f . callback) in fns-and-callbacks
             for str = (funcall f callback)
             when (or (null str) (stringp str)) do (funcall callback str)))
  t)