Mercurial > emacs
comparison lisp/isearch.el @ 82060:d22a586b6032
(isearch-message-function): New variable.
(isearch-update, isearch-search): Use it.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Mon, 23 Jul 2007 20:29:10 +0000 |
parents | ee17cf620665 |
children | b98604865ea0 fd5b4a865d1d 492971a3f31f |
comparison
equal
deleted
inserted
replaced
82059:a0869eab905f | 82060:d22a586b6032 |
---|---|
161 When these functions are called, `isearch-mode-end-hook-quit' | 161 When these functions are called, `isearch-mode-end-hook-quit' |
162 is non-nil if the user quit the search.") | 162 is non-nil if the user quit the search.") |
163 | 163 |
164 (defvar isearch-mode-end-hook-quit nil | 164 (defvar isearch-mode-end-hook-quit nil |
165 "Non-nil while running `isearch-mode-end-hook' if user quit the search.") | 165 "Non-nil while running `isearch-mode-end-hook' if user quit the search.") |
166 | |
167 (defvar isearch-message-function nil | |
168 "Function to call to display the search prompt. | |
169 If nil, use `isearch-message'.") | |
166 | 170 |
167 (defvar isearch-wrap-function nil | 171 (defvar isearch-wrap-function nil |
168 "Function to call to wrap the search when search is failed. | 172 "Function to call to wrap the search when search is failed. |
169 If nil, move point to the beginning of the buffer for a forward search, | 173 If nil, move point to the beginning of the buffer for a forward search, |
170 or to the end of the buffer for a backward search.") | 174 or to the end of the buffer for a backward search.") |
713 ;; Called after each command to update the display. | 717 ;; Called after each command to update the display. |
714 (if (and (null unread-command-events) | 718 (if (and (null unread-command-events) |
715 (null executing-kbd-macro)) | 719 (null executing-kbd-macro)) |
716 (progn | 720 (progn |
717 (if (not (input-pending-p)) | 721 (if (not (input-pending-p)) |
718 (isearch-message)) | 722 (if isearch-message-function |
723 (funcall isearch-message-function) | |
724 (isearch-message))) | |
719 (if (and isearch-slow-terminal-mode | 725 (if (and isearch-slow-terminal-mode |
720 (not (or isearch-small-window | 726 (not (or isearch-small-window |
721 (pos-visible-in-window-p)))) | 727 (pos-visible-in-window-p)))) |
722 (let ((found-point (point))) | 728 (let ((found-point (point))) |
723 (setq isearch-small-window t) | 729 (setq isearch-small-window t) |
2033 (goto-char pos1)) | 2039 (goto-char pos1)) |
2034 pos1)) | 2040 pos1)) |
2035 | 2041 |
2036 (defun isearch-search () | 2042 (defun isearch-search () |
2037 ;; Do the search with the current search string. | 2043 ;; Do the search with the current search string. |
2038 (isearch-message nil t) | 2044 (if isearch-message-function |
2045 (funcall isearch-message-function nil t) | |
2046 (isearch-message nil t)) | |
2039 (if (and (eq isearch-case-fold-search t) search-upper-case) | 2047 (if (and (eq isearch-case-fold-search t) search-upper-case) |
2040 (setq isearch-case-fold-search | 2048 (setq isearch-case-fold-search |
2041 (isearch-no-upper-case-p isearch-string isearch-regexp))) | 2049 (isearch-no-upper-case-p isearch-string isearch-regexp))) |
2042 (condition-case lossage | 2050 (condition-case lossage |
2043 (let ((inhibit-point-motion-hooks search-invisible) | 2051 (let ((inhibit-point-motion-hooks search-invisible) |