(?.): New character category for
authorKenichi Handa <handa@m17n.org>
Thu, 12 Feb 2009 05:48:41 +0000 (05:48 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 12 Feb 2009 05:48:41 +0000 (05:48 +0000)
Base characters.  Set them in the standard category table.

lisp/ChangeLog
lisp/international/characters.el

index f3af325..a635e65 100644 (file)
@@ -1,3 +1,11 @@
+2009-02-12  Kenichi Handa  <handa@m17n.org>
+
+       * international/characters.el (?.): New character category for
+       Base characters.  Set them in the standard category table.
+
+       * composite.el: Use "\\c." instead of "[[:alpha:]]" to match with
+       a base character.
+
 2009-02-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * isearch.el (isearch-yank-char-in-minibuffer)
index fd03468..011536e 100644 (file)
@@ -110,9 +110,11 @@ A character which can't be placed at beginning of line.")
 (define-category ?< "Not at eol
 A character which can't be placed at end of line.")
 
-;; Combining
+;; Base and Combining
+(define-category ?. "Base
+Base characters (Unicode General Category L,N,P,S,Zs)")
 (define-category ?^ "Combining
-Combining diacritic or mark")
+Combining diacritic or mark (Unicode General Category M")
 \f
 ;;; Setting syntax and category.
 
@@ -1049,7 +1051,6 @@ Setup char-width-table appropriate for non-CJK language environment."
   (setq char-width-table (char-table-parent cjk-char-width-table)))
 
 (optimize-char-table (standard-case-table))
-(optimize-char-table (standard-category-table))
 (optimize-char-table (standard-syntax-table))
 
 \f
@@ -1182,6 +1183,15 @@ Setup char-width-table appropriate for non-CJK language environment."
     table))
 
 (setq unicode-category-table (build-unicode-category-table))
+(map-char-table #'(lambda (key val)
+                   (if (and val
+                            (or (and (/= (aref (symbol-name val) 0) ?M)
+                                     (/= (aref (symbol-name val) 0) ?C))
+                                (eq val 'Zs)))
+                       (modify-category-entry key ?.)))
+               unicode-category-table)
+
+(optimize-char-table (standard-category-table))
 
 \f
 ;;; Setting word boundary.