Function: eldoc-minibuffer-message

eldoc-minibuffer-message is a byte-compiled function defined in eldoc.el.gz.

Signature

(eldoc-minibuffer-message FORMAT-STRING &rest ARGS)

Documentation

Display message specified by FORMAT-STRING and ARGS on the mode-line as needed.

This function displays the message produced by formatting ARGS with FORMAT-STRING on the mode line when the current buffer is a minibuffer. Otherwise, it displays the message like message would.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eldoc.el.gz
(defun eldoc-minibuffer-message (format-string &rest args)
  "Display message specified by FORMAT-STRING and ARGS on the mode-line as needed.
This function displays the message produced by formatting ARGS
with FORMAT-STRING on the mode line when the current buffer is a minibuffer.
Otherwise, it displays the message like `message' would."
  (if (or (bound-and-true-p edebug-mode) (minibufferp))
      (progn
        (add-hook 'post-command-hook #'eldoc-minibuffer--cleanup)
	(with-current-buffer
	    (window-buffer
	     (or (window-in-direction 'above (minibuffer-window))
		 (minibuffer-selected-window)
		 (get-largest-window)))
          (when (and mode-line-format
                     (not (and (listp mode-line-format)
                               (assq 'eldoc-mode-line-string mode-line-format))))
	    (setq mode-line-format
                  (funcall
                   (if (listp mode-line-format) #'append #'list)
                   (list "" '(eldoc-mode-line-string
			      (" " eldoc-mode-line-string " ")))
                   mode-line-format)))
          (setq eldoc-mode-line-string
                (when (stringp format-string)
                  (apply #'format-message format-string args)))
          (force-mode-line-update)))
    (apply #'message format-string args)))