Function: eldoc-pre-command-refresh-echo-area

eldoc-pre-command-refresh-echo-area is a byte-compiled function defined in eldoc.el.gz.

Signature

(eldoc-pre-command-refresh-echo-area)

Documentation

Reprint eldoc-last-message in the echo area.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eldoc.el.gz
;; This function goes on pre-command-hook.
;; Motion commands clear the echo area for some reason,
;; which make eldoc messages flicker or disappear just before motion
;; begins.  This function reprints the last eldoc message immediately
;; before the next command executes, which does away with the flicker.
;; This doesn't seem to be required for Emacs 19.28 and earlier.
;; FIXME: The above comment suggests we don't really understand why
;; this is needed.  Maybe it's not needed any more, but if it is
;; we should figure out why.
(defun eldoc-pre-command-refresh-echo-area ()
  "Reprint `eldoc-last-message' in the echo area."
  (and eldoc-last-message
       (not (minibufferp))      ;We don't use the echo area when in minibuffer.
       (if (and (eldoc-display-message-no-interference-p)
		(eldoc--message-command-p this-command))
	   (eldoc--message eldoc-last-message)
         ;; No need to call eldoc--message since the echo area will be cleared
         ;; for us, but do note that the last-message will be gone.
         (setq eldoc-last-message nil))))