From: Lars Ingebrigtsen Date: Fri, 10 Sep 2021 10:27:28 +0000 (+0200) Subject: Change the default value of search-whitespace-regexp X-Git-Tag: emacs-28.0.90~1087 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=74d091a0a665da5dc01989d1b06a61ee21b975b2;p=emacs.git Change the default value of search-whitespace-regexp * lisp/isearch.el (search-whitespace-regexp): Change the default to always exclude newlines from the set (bug#21278). It used to be mode-dependent whether newlines were included or not, and this was confusing as a user interface. --- diff --git a/etc/NEWS b/etc/NEWS index 8f20db7a768..01eb2a5611a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1031,6 +1031,12 @@ search string is at least this long. 'lazy-highlight-initial-delay' still applies for shorter search strings, which avoids flicker in the search buffer due to too many matches being highlighted. +--- +*** The default 'search-whitespace-regexp' value has changed. +This used to be "\\s-+", which meant that it was mode-dependent whether +newlines were included in the whitespace set. This has now been +changed to only match spaces and tab characters. + ** Dired +++ diff --git a/lisp/isearch.el b/lisp/isearch.el index 1c776a06e13..71c9ce31deb 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 "\\s-+") +(defcustom search-whitespace-regexp (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, @@ -134,7 +134,7 @@ add any capturing groups into this value; that can change the numbering of existing capture groups in unexpected ways." :type '(choice (const :tag "Match Spaces Literally" nil) regexp) - :version "24.3") + :version "28.1") (defcustom search-invisible 'open "If t incremental search/query-replace can match hidden text.