emacs-diffs
[Top][All Lists]
Advanced

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

master 061f8f2 1/2: Fix behavior of isearch-{beginning, end}-of-buffer


From: Lars Ingebrigtsen
Subject: master 061f8f2 1/2: Fix behavior of isearch-{beginning, end}-of-buffer
Date: Fri, 10 Sep 2021 06:42:46 -0400 (EDT)

branch: master
commit 061f8f28000e39f6ec4194ec2face3eb6e880846
Author: Gregory Heytings <gregory@heytings.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix behavior of isearch-{beginning,end}-of-buffer
    
    * lisp/isearch.el (isearch-beginning-of-buffer)
    (isearch-end-of-buffer): Fix their behavior when
    isearch-repeat-on-direction-change is non-nil (bug#50466).
---
 lisp/isearch.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 71c9ce3..357760c 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -114,7 +114,7 @@ is called to let you enter the search string, and RET 
terminates editing
 and does a nonincremental search.)"
   :type 'boolean)
 
-(defcustom search-whitespace-regexp (purecopy "[ \t]")
+(defcustom search-whitespace-regexpx (purecopy "[ \t]")
   "If non-nil, regular expression to match a sequence of whitespace chars.
 When you enter a space or spaces in the incremental search, it
 will match any sequence matched by this regexp.  As an exception,
@@ -2009,7 +2009,8 @@ type \\[isearch-repeat-forward] with a numeric argument."
     ;; don't forward char in isearch-repeat
     (setq isearch-just-started t)
     (goto-char (point-min))
-    (isearch-repeat 'forward arg)))
+    (let ((isearch-repeat-on-direction-change nil))
+      (isearch-repeat 'forward arg))))
 
 (defun isearch-end-of-buffer (&optional arg)
   "Go to the last occurrence of the current search string.
@@ -2023,7 +2024,8 @@ type \\[isearch-repeat-backward] with a numeric argument."
       (isearch-beginning-of-buffer (abs arg))
     (setq isearch-just-started t)
     (goto-char (point-max))
-    (isearch-repeat 'backward arg)))
+    (let ((isearch-repeat-on-direction-change nil))
+      (isearch-repeat 'backward arg))))
 
 
 ;;; Toggles for `isearch-regexp-function' and `search-default-mode'.



reply via email to

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