Function: eshell-history-isearch-message

eshell-history-isearch-message is a byte-compiled function defined in em-hist.el.gz.

Signature

(eshell-history-isearch-message &optional C-Q-HACK ELLIPSIS)

Documentation

Display the input history search prompt.

If there are no search errors, this function displays an overlay with the Isearch prompt which replaces the original Eshell prompt. Otherwise, it displays the standard Isearch message returned from the function isearch-message(var)/isearch-message(fun).

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-hist.el.gz
(defun eshell-history-isearch-message (&optional c-q-hack ellipsis)
  "Display the input history search prompt.
If there are no search errors, this function displays an overlay with
the Isearch prompt which replaces the original Eshell prompt.
Otherwise, it displays the standard Isearch message returned from the
function `isearch-message'."
  (if (not (and isearch-success (not isearch-error)))
      ;; Use standard message function (which displays a message in the
      ;; echo area) when not in command line, or search fails or has
      ;; errors (like incomplete regexp).
      (isearch-message c-q-hack ellipsis)
    ;; Otherwise, use an overlay over the Eshell prompt.
    (if (overlayp eshell--history-isearch-message-overlay)
        (move-overlay eshell--history-isearch-message-overlay
                      (save-excursion
                        (goto-char eshell-last-output-end)
                        (forward-line 0)
                        (point))
                      eshell-last-output-end)
      (setq eshell--history-isearch-message-overlay
            (make-overlay (save-excursion
                            (goto-char eshell-last-output-end)
                            (forward-line 0)
                            (point))
                          eshell-last-output-end))
      (overlay-put eshell--history-isearch-message-overlay 'evaporate t))
    (overlay-put eshell--history-isearch-message-overlay
                 'display (isearch-message-prefix ellipsis
                                                  isearch-nonincremental))
    (if (and eshell-history-index (not ellipsis))
        (message "History item: %d" (- (ring-length eshell-history-ring)
                                       eshell-history-index))
      (message ""))))