1 \documentclass[a4j]{jarticle}
3 \title{XEmacs UTF-2000 API}
4 \author{
\e$B<i2,
\e(B
\e$BCNI'
\e(B}
7 \newenvironment{feature}[1]
8 {\vspace{0.3em}\noindent{\textbf{
\e$B5!G=
\e(B #1}}\vspace{-0.5em}\begin{quote}}
11 \newenvironment{function}[2]
12 {\vspace{0.3em}\noindent{\textbf{
\e$B4X?t
\e(B #1} (\textit{#2})}\vspace{-0.5em}\begin{quote}}
15 \newenvironment{example}
16 {\begin{description}\item [
\e$B!NNc!O
\e(B]}
19 \newcommand{\optargs}[1]{{\sl\textbf{\&optional}} #1}
21 \newcommand{\var}[1]{\textit{#1}}
23 \newcommand{\sym}[1]{\textsf{#1}}
25 \newcommand{\func}[1]{\sym{#1}}
31 \begin{feature}{utf-2000}
32 UTF-2000
\e$B5!G=$rDs6!$9$k!#
\e(B
40 \begin{function}{define-char}{char-spec}
41 \e$BJ8;zB0@-$N=89g
\e(B \var{char-spec}
\e$B$GI=8=$5$l$kJ8;z%*%V%8%'%/%H$rDj5A$7!"
\e(B
42 \e$B$=$NJ8;z%*%V%8%'%/%H$rJV$9!#
\e(B
44 \e$BJ8;zB0@-$N=89g
\e(B \var{char-spec}
\e$B$OO"A[%j%9%H$G$"$k!#
\e(B
49 '((name . "CJK RADICAL SECOND TWO")
50 (general-category symbol other) ; Informative Category
51 (bidi-category . "ON")
58 (chinese-big5-cdp . #x8C5D)
62 %%
\e$B$3$NNc!"
\e(Bline by line
\e$B$N@bL@$,$[$7$$!#
\e(B
66 \begin{function}{get-char-attribute}
67 {character attribute \optargs{default-value}}
68 \e$BJ8;z%*%V%8%'%/%H
\e(B \var{character}
\e$B$NB0@-
\e(B \var{attribute}
\e$B$N
\e(B
71 Return \var{default-value} if the value is not exist.
75 (get-char-attribute ?
\e$B$"
\e(B 'name)
76 \e$B"*
\e(B "HIRAGANA LETTER A"
79 %%
\e$B>e$HF1$8Nc$r;H$&$[$&$,?F@Z$+$b!#!V$"!W$C$F8+$?$3$H$J$$?M$K$bFI
\e(B
80 %%
\e$B$^$;$k$J$i!#
\e(B
83 \begin{function}{put-char-attribute}{character attribute value}
84 \e$BJ8;z%*%V%8%'%/%H
\e(B \var{character}
\e$B$NB0@-
\e(B \var{attribute}
\e$B$N
\e(B
85 \e$BCM$r
\e(B \var{value}
\e$B$K@_Dj$9$k!#
\e(B
89 (get-char-attribute ?
\e$B$"
\e(B 'foo)
91 (put-char-attribute ?
\e$B$"
\e(B 'foo 1)
93 (get-char attribute ?
\e$B$"
\e(B 'foo)
99 \begin{function}{find-char}{attributes}
100 In order to find a character object by a character \var{attribute},
101 a builtin function \func{find-char} may be convenient. This
102 function retrieves the character that has specified attributes.
105 \begin{function}{map-char-attribute}{function attribute \optargs{range}}
106 A map function for character attributes is also available. This
107 function is useful in finding characters with a character
108 attribute, or processing by a character attribute,
110 This function maps \var{function} over entries in \var{attribute},
111 %%
\e$B0J2<$O
\e(Battribute ((key value)
\e$B$N%j%9%H
\e(B)
\e$B$NA4MWAG$KBP$7$F
\e(B function
112 %% (key value)
\e$B$r8F$V!#$G$$$$$N!)
\e(B
114 calling it with two arguments, each key and value in the table.
117 specifies a subrange to map over and
118 %%
\e$B0lHL$NFI<T$O
\e(B XEmacsLisp
\e$B$OCN$i$J$$!#
\e(B
119 is in the same format as the
121 'put-range-table'. If omitted or t, it defaults to
122 the entire table. See Fig~\ref{fig:map-char-attribute}
124 for an example using this function.
127 \begin{function}{char-attribute-alist}{character}
128 You can get every attributes of a character as an association-list
129 by a built-in function \var{char-attribute-alist}.
131 This function returns the alist of attributes of \var{character}.
134 \begin{function}{char-attribute-list}{}
135 You can get the list of character attributes by a builtin function
136 \func{char-attribute-list}.
138 This function returns the list of all existing character
142 \begin{function}{encode-char}{character coded-charset \optargs{defined-only}}
143 Return code-point of \var{character} in specified \var{coded-charset}.
146 \begin{function}{decode-char}{coded-charset code \optargs{defined-only}}
147 Make a character from \var{coded-charset} and code-point \var{code}.
149 If \var{defined-only} is non-\sym{nil}, builtin character is not returned.
150 If corresponding character is not found, \sym{nil} is returned.
153 \begin{function}{decode-builtin-char}{coded-charset code}
154 Make a builtin character from \var{coded-charset} and code-point \var{code}.