[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/international/characters.el,v
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/international/characters.el,v |
Date: |
Fri, 29 Aug 2008 08:01:44 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 08/08/29 08:01:43
Index: characters.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/characters.el,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- characters.el 6 May 2008 04:18:09 -0000 1.75
+++ characters.el 29 Aug 2008 08:01:43 -0000 1.76
@@ -1116,6 +1116,26 @@
'tibetan)
+;;; Setting unicode-category-table.
+
+;; This macro is to build unicode-category-table at compile time so
+;; that C code can access the table efficiently.
+(defmacro build-unicode-category-table ()
+ (let ((table (make-char-table 'unicode-category-table nil)))
+ (dotimes (i #x110000)
+ (if (or (< i #xD800)
+ (and (> i #xF900) (< i #x30000))
+ (and (> i #xE0000) (< i #xE0200)))
+ (aset table i (get-char-code-property i 'general-category))))
+ (set-char-table-range table '(#xE000 . #xF8FF) 'Co)
+ (set-char-table-range table '(#xF0000 . #xFFFFD) 'Co)
+ (set-char-table-range table '(#x100000 . #x10FFFD) 'Co)
+ (optimize-char-table table 'eq)
+ table))
+
+(setq unicode-category-table (build-unicode-category-table))
+
+
;;; Setting word boundary.
(defun next-word-boundary-han (pos limit)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/international/characters.el,v,
Kenichi Handa <=