emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/follow bf510d8 2/3: lisp/isearch.el: Eliminate mac


From: Alan Mackenzie
Subject: [Emacs-diffs] scratch/follow bf510d8 2/3: lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall.
Date: Fri, 04 Dec 2015 19:22:15 +0000

branch: scratch/follow
commit bf510d8ab047fc44fe7ed3521944c23b9476375b
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    lisp/isearch.el: Eliminate macro isearch-call-message, replacing with 
funcall.
---
 lisp/isearch.el |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 39d573c..12ded02 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -177,11 +177,6 @@ is non-nil if the user quits the search.")
   "Function to call to display the search prompt.
 If nil, use function `isearch-message'.")
 
-(defmacro isearch-call-message (&optional cqh ellip)
-  `(if isearch-message-function
-       (funcall isearch-message-function ,cqh ,ellip)
-     (isearch-message ,cqh ,ellip)))
-
 (defvar isearch-wrap-function nil
   "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,
@@ -983,7 +978,7 @@ The last thing it does is to run 
`isearch-update-post-hook'."
           (null executing-kbd-macro))
       (progn
         (if (not (input-pending-p))
-            (isearch-call-message))
+          (funcall (or isearch-message-function #'isearch-message)))
         (if (and isearch-slow-terminal-mode
                  (not (or isearch-small-window
                           (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
                  isearch-case-fold-search isearch-new-case-fold)
 
            ;; Restore the minibuffer message before moving point.
-           (isearch-call-message nil t)
+            (funcall (or isearch-message-function #'isearch-message) nil t)
 
            ;; Set point at the start (end) of old match if forward (backward),
            ;; so after exiting minibuffer isearch resumes at the start (end)
@@ -1937,7 +1932,8 @@ If search string is empty, just beep."
                                            (length isearch-string))))
           isearch-message (mapconcat 'isearch-text-char-description
                                      isearch-string "")))
-  (isearch-call-message nil t)                 ; Do this before moving point.
+  ;; Do the following before moving point.
+  (funcall (or isearch-message-function #'isearch-message) nil t)
   ;; Use the isearch-other-end as new starting point to be able
   ;; to find the remaining part of the search string again.
   ;; This is like what `isearch-search-and-update' does,
@@ -2114,7 +2110,8 @@ With argument, add COUNT copies of the character."
              (setq isearch-case-fold-search
                    (isearch-no-upper-case-p isearch-string isearch-regexp))))
       ;; Not regexp, not reverse, or no match at point.
-      (isearch-call-message nil t)     ; Do this before moving point.
+      ;; Do the following before moving point.
+      (funcall (or isearch-message-function #'isearch-message) nil t)
       (if (and isearch-other-end (not isearch-adjusted))
          (goto-char (if isearch-forward isearch-other-end
                       (min isearch-opoint
@@ -2468,7 +2465,7 @@ Search is updated accordingly."
   (isearch-ring-adjust1 advance)
   (if search-ring-update
       (progn
-       (isearch-call-message nil t)
+        (funcall (or isearch-message-function #'isearch-message) nil t)
        (isearch-search)
        (isearch-push-state)
        (isearch-update))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]