summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2021-09-10 12:39:33 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-09-10 12:39:33 +0200
commit061f8f28000e39f6ec4194ec2face3eb6e880846 (patch)
tree4647f73af355df32dee9a76576fc701c87fc331e /lisp
parent74d091a0a665da5dc01989d1b06a61ee21b975b2 (diff)
downloademacs-061f8f28000e39f6ec4194ec2face3eb6e880846.tar.gz
emacs-061f8f28000e39f6ec4194ec2face3eb6e880846.tar.bz2
emacs-061f8f28000e39f6ec4194ec2face3eb6e880846.zip
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).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/isearch.el8
1 files changed, 5 insertions, 3 deletions
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'.