diff options
| author | Alan Mackenzie | 2015-11-18 21:14:30 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2015-12-04 18:15:27 +0000 |
| commit | bf510d8ab047fc44fe7ed3521944c23b9476375b (patch) | |
| tree | eabf3bcd0324b8fadb7892f30844ff4c4baae4cb | |
| parent | 64c57303658f69b019c4599f8c960a5623855410 (diff) | |
| download | emacs-bf510d8ab047fc44fe7ed3521944c23b9476375b.tar.gz emacs-bf510d8ab047fc44fe7ed3521944c23b9476375b.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 39d573cc01f..12ded02345f 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -177,11 +177,6 @@ is non-nil if the user quits the search.") | |||
| 177 | "Function to call to display the search prompt. | 177 | "Function to call to display the search prompt. |
| 178 | If nil, use function `isearch-message'.") | 178 | If nil, use function `isearch-message'.") |
| 179 | 179 | ||
| 180 | (defmacro isearch-call-message (&optional cqh ellip) | ||
| 181 | `(if isearch-message-function | ||
| 182 | (funcall isearch-message-function ,cqh ,ellip) | ||
| 183 | (isearch-message ,cqh ,ellip))) | ||
| 184 | |||
| 185 | (defvar isearch-wrap-function nil | 180 | (defvar isearch-wrap-function nil |
| 186 | "Function to call to wrap the search when search is failed. | 181 | "Function to call to wrap the search when search is failed. |
| 187 | If nil, move point to the beginning of the buffer for a forward search, | 182 | If nil, move point to the beginning of the buffer for a forward search, |
| @@ -983,7 +978,7 @@ The last thing it does is to run `isearch-update-post-hook'." | |||
| 983 | (null executing-kbd-macro)) | 978 | (null executing-kbd-macro)) |
| 984 | (progn | 979 | (progn |
| 985 | (if (not (input-pending-p)) | 980 | (if (not (input-pending-p)) |
| 986 | (isearch-call-message)) | 981 | (funcall (or isearch-message-function #'isearch-message))) |
| 987 | (if (and isearch-slow-terminal-mode | 982 | (if (and isearch-slow-terminal-mode |
| 988 | (not (or isearch-small-window | 983 | (not (or isearch-small-window |
| 989 | (pos-visible-in-window-p nil nil nil t)))) | 984 | (pos-visible-in-window-p nil nil nil t)))) |
| @@ -1317,7 +1312,7 @@ You can update the global isearch variables by setting new values to | |||
| 1317 | isearch-case-fold-search isearch-new-case-fold) | 1312 | isearch-case-fold-search isearch-new-case-fold) |
| 1318 | 1313 | ||
| 1319 | ;; Restore the minibuffer message before moving point. | 1314 | ;; Restore the minibuffer message before moving point. |
| 1320 | (isearch-call-message nil t) | 1315 | (funcall (or isearch-message-function #'isearch-message) nil t) |
| 1321 | 1316 | ||
| 1322 | ;; Set point at the start (end) of old match if forward (backward), | 1317 | ;; Set point at the start (end) of old match if forward (backward), |
| 1323 | ;; so after exiting minibuffer isearch resumes at the start (end) | 1318 | ;; so after exiting minibuffer isearch resumes at the start (end) |
| @@ -1937,7 +1932,8 @@ If search string is empty, just beep." | |||
| 1937 | (length isearch-string)))) | 1932 | (length isearch-string)))) |
| 1938 | isearch-message (mapconcat 'isearch-text-char-description | 1933 | isearch-message (mapconcat 'isearch-text-char-description |
| 1939 | isearch-string ""))) | 1934 | isearch-string ""))) |
| 1940 | (isearch-call-message nil t) ; Do this before moving point. | 1935 | ;; Do the following before moving point. |
| 1936 | (funcall (or isearch-message-function #'isearch-message) nil t) | ||
| 1941 | ;; Use the isearch-other-end as new starting point to be able | 1937 | ;; Use the isearch-other-end as new starting point to be able |
| 1942 | ;; to find the remaining part of the search string again. | 1938 | ;; to find the remaining part of the search string again. |
| 1943 | ;; This is like what `isearch-search-and-update' does, | 1939 | ;; This is like what `isearch-search-and-update' does, |
| @@ -2114,7 +2110,8 @@ With argument, add COUNT copies of the character." | |||
| 2114 | (setq isearch-case-fold-search | 2110 | (setq isearch-case-fold-search |
| 2115 | (isearch-no-upper-case-p isearch-string isearch-regexp)))) | 2111 | (isearch-no-upper-case-p isearch-string isearch-regexp)))) |
| 2116 | ;; Not regexp, not reverse, or no match at point. | 2112 | ;; Not regexp, not reverse, or no match at point. |
| 2117 | (isearch-call-message nil t) ; Do this before moving point. | 2113 | ;; Do the following before moving point. |
| 2114 | (funcall (or isearch-message-function #'isearch-message) nil t) | ||
| 2118 | (if (and isearch-other-end (not isearch-adjusted)) | 2115 | (if (and isearch-other-end (not isearch-adjusted)) |
| 2119 | (goto-char (if isearch-forward isearch-other-end | 2116 | (goto-char (if isearch-forward isearch-other-end |
| 2120 | (min isearch-opoint | 2117 | (min isearch-opoint |
| @@ -2468,7 +2465,7 @@ Search is updated accordingly." | |||
| 2468 | (isearch-ring-adjust1 advance) | 2465 | (isearch-ring-adjust1 advance) |
| 2469 | (if search-ring-update | 2466 | (if search-ring-update |
| 2470 | (progn | 2467 | (progn |
| 2471 | (isearch-call-message nil t) | 2468 | (funcall (or isearch-message-function #'isearch-message) nil t) |
| 2472 | (isearch-search) | 2469 | (isearch-search) |
| 2473 | (isearch-push-state) | 2470 | (isearch-push-state) |
| 2474 | (isearch-update)) | 2471 | (isearch-update)) |