1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00

(isearch-message-function): New variable.

(isearch-update, isearch-search): Use it.
This commit is contained in:
Juri Linkov 2007-07-23 20:29:10 +00:00
parent 33e0847dbb
commit ac475d3a72

View file

@ -164,6 +164,10 @@ is non-nil if the user quit the search.")
(defvar isearch-mode-end-hook-quit nil (defvar isearch-mode-end-hook-quit nil
"Non-nil while running `isearch-mode-end-hook' if user quit the search.") "Non-nil while running `isearch-mode-end-hook' if user quit the search.")
(defvar isearch-message-function nil
"Function to call to display the search prompt.
If nil, use `isearch-message'.")
(defvar isearch-wrap-function nil (defvar isearch-wrap-function nil
"Function to call to wrap the search when search is failed. "Function to call to wrap the search when search is failed.
If nil, move point to the beginning of the buffer for a forward search, If nil, move point to the beginning of the buffer for a forward search,
@ -715,7 +719,9 @@ is treated as a regexp. See \\[isearch-forward] for more info."
(null executing-kbd-macro)) (null executing-kbd-macro))
(progn (progn
(if (not (input-pending-p)) (if (not (input-pending-p))
(isearch-message)) (if isearch-message-function
(funcall isearch-message-function)
(isearch-message)))
(if (and isearch-slow-terminal-mode (if (and isearch-slow-terminal-mode
(not (or isearch-small-window (not (or isearch-small-window
(pos-visible-in-window-p)))) (pos-visible-in-window-p))))
@ -2035,7 +2041,9 @@ Can be changed via `isearch-search-fun-function' for special needs."
(defun isearch-search () (defun isearch-search ()
;; Do the search with the current search string. ;; Do the search with the current search string.
(isearch-message nil t) (if isearch-message-function
(funcall isearch-message-function nil t)
(isearch-message nil t))
(if (and (eq isearch-case-fold-search t) search-upper-case) (if (and (eq isearch-case-fold-search t) search-upper-case)
(setq isearch-case-fold-search (setq isearch-case-fold-search
(isearch-no-upper-case-p isearch-string isearch-regexp))) (isearch-no-upper-case-p isearch-string isearch-regexp)))