From: Gregory Heytings Date: Fri, 10 Sep 2021 10:39:33 +0000 (+0200) Subject: Fix behavior of isearch-{beginning,end}-of-buffer X-Git-Tag: emacs-28.0.90~1086 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=061f8f28000e39f6ec4194ec2face3eb6e880846;p=emacs.git 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). --- diff --git a/lisp/isearch.el b/lisp/isearch.el index 71c9ce31deb..357760caee6 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'.