Function: isearch-message-prefix
isearch-message-prefix is a byte-compiled function defined in
isearch.el.gz.
Signature
(isearch-message-prefix &optional ELLIPSIS NONINCREMENTAL)
Documentation
This function has :around advice: evil--use-search-prompt.
Source Code
;; Defined in /usr/src/emacs/lisp/isearch.el.gz
(defun isearch-message-prefix (&optional ellipsis nonincremental)
;; If about to search, and previous search regexp was invalid,
;; check that it still is. If it is valid now,
;; let the message we display while searching say that it is valid.
(and isearch-error ellipsis
(condition-case ()
(progn (re-search-forward isearch-string (point) t)
(setq isearch-error nil))
(error nil)))
;; If currently failing, display no ellipsis.
(or isearch-success (setq ellipsis nil))
(let ((m (concat (if isearch-success "" "failing ")
(if isearch-adjusted "pending " "")
(if (and isearch-wrapped
(not isearch-wrap-function)
(if isearch-forward
(> (point) isearch-opoint)
(< (point) isearch-opoint)))
"over")
(if isearch-wrapped "wrapped ")
(if (and (not isearch-success) (buffer-narrowed-p) widen-automatically)
"narrowed " "")
(if (and (not isearch-success) (not isearch-case-fold-search))
"case-sensitive ")
(let ((prefix ""))
(advice-function-mapc
(lambda (_ props)
(let ((np (cdr (assq 'isearch-message-prefix props))))
(if np (setq prefix (concat np prefix)))))
isearch-filter-predicate)
prefix)
(isearch--describe-regexp-mode isearch-regexp-function)
(cond
(multi-isearch-file-list "multi-file ")
(multi-isearch-buffer-list "multi-buffer ")
(t ""))
(or isearch-message-prefix-add "")
(if nonincremental "search" "I-search")
(if isearch-forward "" " backward")
(if current-input-method
;; Input methods for RTL languages use RTL
;; characters for their title, and that messes
;; up the display of search text after the prompt.
(bidi-string-mark-left-to-right
(concat " [" current-input-method-title "]: "))
": ")
)))
(apply #'propertize (concat (isearch-lazy-count-format)
(upcase (substring m 0 1)) (substring m 1))
isearch-message-properties)))