Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
59db3a5c
Commit
59db3a5c
authored
Aug 29, 2008
by
Kenichi Handa
Browse files
(unicode-category-table): Setup unicode-category-table.
parent
ef19e2f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
lisp/international/characters.el
lisp/international/characters.el
+20
-0
No files found.
lisp/international/characters.el
View file @
59db3a5c
...
...
@@ -1115,6 +1115,26 @@ Setup char-width-table appropriate for non-CJK language environment."
(
set-char-table-range
char-script-table
range
'tibetan
))
'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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment