emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/xr 0331e00 10/13: Recognise \sW as alias for \sw


From: Mattias Engdegård
Subject: [elpa] externals/xr 0331e00 10/13: Recognise \sW as alias for \sw
Date: Wed, 13 Feb 2019 04:03:28 -0500 (EST)

branch: externals/xr
commit 0331e0055f964218d068e99c8aeb09225a8afe41
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    Recognise \sW as alias for \sw
    
    The syntax class W appears to be an undocumented alternative to w,
    and \sW has been spotted at least once in the wild.
---
 xr-test.el | 3 ++-
 xr.el      | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/xr-test.el b/xr-test.el
index 7929e2a..9f48d28 100644
--- a/xr-test.el
+++ b/xr-test.el
@@ -79,8 +79,9 @@
   )
 
 (ert-deftest xr-syntax ()
-  (should (equal (xr "\\s-\\s \\sw\\s_\\s.\\s(\\s)\\s\"")
+  (should (equal (xr "\\s-\\s \\sw\\sW\\s_\\s.\\s(\\s)\\s\"")
                  '(seq (syntax whitespace) (syntax whitespace) (syntax word)
+                      (syntax word)
                        (syntax symbol) (syntax punctuation)
                        (syntax open-parenthesis) (syntax close-parenthesis)
                        (syntax string-quote))))
diff --git a/xr.el b/xr.el
index d7d28e3..d77b78c 100644
--- a/xr.el
+++ b/xr.el
@@ -208,6 +208,7 @@
                      (?\s . whitespace)
                      (?.  . punctuation)
                      (?w  . word)
+                     (?W  . word)      ; undocumented
                      (?_  . symbol)
                      (?\( . open-parenthesis)
                      (?\) . close-parenthesis)



reply via email to

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