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

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

[elpa] externals/xr f79d50c 12/13: Add categories L, R, . and SPC


From: Mattias Engdegård
Subject: [elpa] externals/xr f79d50c 12/13: Add categories L, R, . and SPC
Date: Wed, 13 Feb 2019 04:03:29 -0500 (EST)

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

    Add categories L, R, . and SPC
    
    The predefined categories L, R, . and SPC were recently added to rx.
    Add them here as well.
---
 xr-test.el | 4 ++++
 xr.el      | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/xr-test.el b/xr-test.el
index 97559fb..87ae21a 100644
--- a/xr-test.el
+++ b/xr-test.el
@@ -124,6 +124,10 @@
   (should (equal (xr "\\C2\\C^")
                  '(seq (not (category upper-diacritical-mark))
                        (not (category combining-diacritic)))))
+  (should (equal (xr "\\cR\\C.\\cL\\C ")
+                '(seq (category strong-right-to-left)
+                      (not (category base)) (category strong-left-to-right)
+                      (not (category space-for-indent)))))
   (should (equal (xr "\\c%\\C+")
                  '(seq (regexp "\\c%") (regexp "\\C+"))))
   )
diff --git a/xr.el b/xr.el
index 9d201ad..9ad19c7 100644
--- a/xr.el
+++ b/xr.el
@@ -158,7 +158,9 @@
 
 (defun xr--char-category (negated category-code)
   (let ((sym (assq category-code
-                   '((?0 . consonant)
+                   '((?\s . space-for-indent)
+                     (?. . base)
+                     (?0 . consonant)
                      (?1 . base-vowel)                        
                      (?2 . upper-diacritical-mark)            
                      (?3 . lower-diacritical-mark)            
@@ -176,7 +178,9 @@
                      (?H . japanese-hiragana-two-byte)        
                      (?I . indian-two-byte)                   
                      (?K . japanese-katakana-two-byte)        
+                     (?L . strong-left-to-right)
                      (?N . korean-hangul-two-byte)            
+                     (?R . strong-right-to-left)
                      (?Y . cyrillic-two-byte)         
                      (?^ . combining-diacritic)               
                      (?a . ascii)                             



reply via email to

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