emacs-diffs
[Top][All Lists]
Advanced

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

master 74d091a: Change the default value of search-whitespace-regexp


From: Lars Ingebrigtsen
Subject: master 74d091a: Change the default value of search-whitespace-regexp
Date: Fri, 10 Sep 2021 06:27:36 -0400 (EDT)

branch: master
commit 74d091a0a665da5dc01989d1b06a61ee21b975b2
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 etc/NEWS        | 6 ++++++
 lisp/isearch.el | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 8f20db7..01eb2a5 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 1c776a0..71c9ce3 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.



reply via email to

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