emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master c8c6ad2: Document that [:cntrl:] does not match DEL


From: Mattias Engdegård
Subject: [Emacs-diffs] master c8c6ad2: Document that [:cntrl:] does not match DEL (Bug#34391)
Date: Sun, 10 Feb 2019 17:37:08 -0500 (EST)

branch: master
commit c8c6ad2429db961fb9410b25fec44b45da96efa1
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    Document that [:cntrl:] does not match DEL (Bug#34391)
    
    * doc/lispref/searching.texi (Character Classes):
    * lisp/emacs-lisp/rx.el (rx):
    Document that [:cntrl:] excludes DEL.
    * test/src/regex-emacs-tests.el (regex-tests-PTESTS-whitelist):
    Swap misplaced comments and fix wrong code for DEL.
---
 doc/lispref/searching.texi    | 2 +-
 lisp/emacs-lisp/rx.el         | 2 +-
 test/src/regex-emacs-tests.el | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 05fc328..cfbd244 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -559,7 +559,7 @@ tabs, and other characters whose Unicode 
@samp{general-category}
 property (@pxref{Character Properties}) indicates they are spacing
 separators.
 @item [:cntrl:]
-This matches any @acronym{ASCII} control character.
+This matches any character whose code is in the range 0--31.
 @item [:digit:]
 This matches @samp{0} through @samp{9}.  Thus, @samp{[-+[:digit:]]}
 matches any digit, as well as @samp{+} and @samp{-}.
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 8b4551d..3fa0204 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -964,7 +964,7 @@ CHAR
      matches 0 through 9.
 
 `control', `cntrl'
-     matches ASCII control characters.
+     matches any character whose code is in the range 0-31.
 
 `hex-digit', `hex', `xdigit'
      matches 0 through 9, a through f and A through F.
diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el
index e84af6b..9a40316 100644
--- a/test/src/regex-emacs-tests.el
+++ b/test/src/regex-emacs-tests.el
@@ -555,11 +555,11 @@ differences in behavior.")
 
 (defconst regex-tests-PTESTS-whitelist
   [
-   ;; emacs doesn't barf on weird ranges such as [b-a], but simply
-   ;; fails to match
+   ;; emacs doesn't see DEL (0x7f) as a [:cntrl:] character
    138
 
-   ;; emacs doesn't see DEL (0x78) as a [:cntrl:] character
+   ;; emacs doesn't barf on weird ranges such as [b-a], but simply
+   ;; fails to match
    168
   ]
   "Line numbers in the PTESTS test that should be skipped.  These



reply via email to

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