diff options
| author | Alan Mackenzie | 2015-11-18 21:14:30 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2015-11-18 21:14:30 +0000 |
| commit | b442b94858c68c412324ff72da1e4c4c725b16df (patch) | |
| tree | b934b8cc4a94919bd417837ab2cb8d6000ab4c38 | |
| parent | 2c56fc2a3f106a1286ad793eed9bfaafd09a7411 (diff) | |
| download | emacs-b442b94858c68c412324ff72da1e4c4c725b16df.tar.gz emacs-b442b94858c68c412324ff72da1e4c4c725b16df.zip | |
lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall.
| -rw-r--r-- | lisp/isearch.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 92d7894d2e7..dc2dca12531 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -171,11 +171,6 @@ is non-nil if the user quits the search.") | |||
| 171 | "Function to call to display the search prompt. | 171 | "Function to call to display the search prompt. |
| 172 | If nil, use function `isearch-message'.") | 172 | If nil, use function `isearch-message'.") |
| 173 | 173 | ||
| 174 | (defmacro isearch-call-message (&optional cqh ellip) | ||
| 175 | `(if isearch-message-function | ||
| 176 | (funcall isearch-message-function ,cqh ,ellip) | ||
| 177 | (isearch-message ,cqh ,ellip))) | ||
| 178 | |||
| 179 | (defvar isearch-wrap-function nil | 174 | (defvar isearch-wrap-function nil |
| 180 | "Function to call to wrap the search when search is failed. | 175 | "Function to call to wrap the search when search is failed. |
| 181 | If nil, move point to the beginning of the buffer for a forward search, | 176 | If nil, move point to the beginning of the buffer for a forward search, |
| @@ -974,7 +969,7 @@ The last thing it does is to run `isearch-update-post-hook'." | |||
| 974 | (null executing-kbd-macro)) | 969 | (null executing-kbd-macro)) |
| 975 | (progn | 970 | (progn |
| 976 | (if (not (input-pending-p)) | 971 | (if (not (input-pending-p)) |
| 977 | (isearch-call-message)) | 972 | (funcall (or isearch-message-function #'isearch-message))) |
| 978 | (if (and isearch-slow-terminal-mode | 973 | (if (and isearch-slow-terminal-mode |
| 979 | (not (or isearch-small-window | 974 | (not (or isearch-small-window |
| 980 | (pos-visible-in-window-p nil nil nil t)))) | 975 | (pos-visible-in-window-p nil nil nil t)))) |
| @@ -1300,7 +1295,7 @@ You can update the global isearch variables by setting new values to | |||
| 1300 | isearch-case-fold-search isearch-new-case-fold) | 1295 | isearch-case-fold-search isearch-new-case-fold) |
| 1301 | 1296 | ||
| 1302 | ;; Restore the minibuffer message before moving point. | 1297 | ;; Restore the minibuffer message before moving point. |
| 1303 | (isearch-call-message nil t) | 1298 | (funcall (or isearch-message-function #'isearch-message) nil t) |
| 1304 | 1299 | ||
| 1305 | ;; Set point at the start (end) of old match if forward (backward), | 1300 | ;; Set point at the start (end) of old match if forward (backward), |
| 1306 | ;; so after exiting minibuffer isearch resumes at the start (end) | 1301 | ;; so after exiting minibuffer isearch resumes at the start (end) |
| @@ -1901,7 +1896,8 @@ If search string is empty, just beep." | |||
| 1901 | (length isearch-string)))) | 1896 | (length isearch-string)))) |
| 1902 | isearch-message (mapconcat 'isearch-text-char-description | 1897 | isearch-message (mapconcat 'isearch-text-char-description |
| 1903 | isearch-string ""))) | 1898 | isearch-string ""))) |
| 1904 | (isearch-call-message nil t) ; Do this before moving point. | 1899 | ;; Do the following before moving point. |
| 1900 | (funcall (or isearch-message-function #'isearch-message) nil t) | ||
| 1905 | ;; Use the isearch-other-end as new starting point to be able | 1901 | ;; Use the isearch-other-end as new starting point to be able |
| 1906 | ;; to find the remaining part of the search string again. | 1902 | ;; to find the remaining part of the search string again. |
| 1907 | ;; This is like what `isearch-search-and-update' does, | 1903 | ;; This is like what `isearch-search-and-update' does, |
| @@ -2078,7 +2074,8 @@ With argument, add COUNT copies of the character." | |||
| 2078 | (setq isearch-case-fold-search | 2074 | (setq isearch-case-fold-search |
| 2079 | (isearch-no-upper-case-p isearch-string isearch-regexp)))) | 2075 | (isearch-no-upper-case-p isearch-string isearch-regexp)))) |
| 2080 | ;; Not regexp, not reverse, or no match at point. | 2076 | ;; Not regexp, not reverse, or no match at point. |
| 2081 | (isearch-call-message nil t) ; Do this before moving point. | 2077 | ;; Do the following before moving point. |
| 2078 | (funcall (or isearch-message-function #'isearch-message) nil t) | ||
| 2082 | (if (and isearch-other-end (not isearch-adjusted)) | 2079 | (if (and isearch-other-end (not isearch-adjusted)) |
| 2083 | (goto-char (if isearch-forward isearch-other-end | 2080 | (goto-char (if isearch-forward isearch-other-end |
| 2084 | (min isearch-opoint | 2081 | (min isearch-opoint |
| @@ -2432,7 +2429,7 @@ Search is updated accordingly." | |||
| 2432 | (isearch-ring-adjust1 advance) | 2429 | (isearch-ring-adjust1 advance) |
| 2433 | (if search-ring-update | 2430 | (if search-ring-update |
| 2434 | (progn | 2431 | (progn |
| 2435 | (isearch-call-message nil t) | 2432 | (funcall (or isearch-message-function #'isearch-message) nil t) |
| 2436 | (isearch-search) | 2433 | (isearch-search) |
| 2437 | (isearch-push-state) | 2434 | (isearch-push-state) |
| 2438 | (isearch-update)) | 2435 | (isearch-update)) |