(feature): New environment.
[chise/specs.git] / chise-elisp_ja.tex
1 \documentclass[a4j]{jarticle}
2
3 \title{XEmacs UTF-2000 API}
4 \author{\e$B<i2,\e(B \e$BCNI'\e(B}
5 \date{}
6
7 \newenvironment{feature}[1]
8 {\vspace{0.3em}\noindent{\textbf{\e$B5!G=\e(B #1}}\vspace{-0.5em}\begin{quote}}
9 {\end{quote}}
10
11 \newenvironment{function}[2]
12 {\vspace{0.3em}\noindent{\textbf{\e$B4X?t\e(B #1} (\textit{#2})}\vspace{-0.5em}\begin{quote}}
13 {\end{quote}}
14
15 \newenvironment{example}
16 {\begin{description}\item [\e$B!NNc!O\e(B]}
17 {\end{description}}
18
19 \newcommand{\optargs}[1]{{\sl\textbf{\&optional}} #1}
20
21 \newcommand{\var}[1]{\textit{#1}}
22
23 \newcommand{\sym}[1]{\textsf{#1}}
24
25 \newcommand{\func}[1]{\sym{#1}}
26
27 \begin{document}
28
29 \maketitle
30
31 \begin{feature}{utf-2000}
32   UTF-2000 \e$B5!G=$rDs6!$9$k!#\e(B
33
34   \begin{example}
35     (featurep 'utf-2000)
36     \e$B"*\e(B t
37   \end{example}
38 \end{feature}
39
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
43
44   \e$BJ8;zB0@-$N=89g\e(B \var{char-spec} \e$B$OO"A[%j%9%H$G$"$k!#\e(B
45
46   \begin{example}
47 \begin{verbatim}
48 (define-char
49   '((name               . "CJK RADICAL SECOND TWO")
50     (general-category   symbol other) ; Informative Category
51     (bidi-category      . "ON")
52     (mirrored           . nil)
53     (total-strokes       . 1)
54     (<-radical
55      ((ucs                . #x4E5A)
56       ))
57     (ideograph-cdp      . -21)
58     (chinese-big5-cdp   . #x8C5D)
59     (ucs                . #x2E83)
60     ))
61 \end{verbatim}
62     %% \e$B$3$NNc!"\e(Bline by line \e$B$N@bL@$,$[$7$$!#\e(B
63   \end{example}
64 \end{function}
65
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
69   \e$BCM$rJV$9!#\e(B
70
71   Return \var{default-value} if the value is not exist.
72
73   \begin{example}
74 \begin{verbatim}
75 (get-char-attribute ?\e$B$"\e(B 'name)
76 \e$B"*\e(B "HIRAGANA LETTER A"
77 \end{verbatim}
78     \end{example}
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
81 \end{function}
82
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
86
87   \begin{example}
88 \begin{verbatim}
89 (get-char-attribute ?\e$B$"\e(B 'foo)
90 \e$B"*\e(Bnil
91 (put-char-attribute ?\e$B$"\e(B 'foo 1)
92 \e$B"*\e(B1
93 (get-char attribute ?\e$B$"\e(B 'foo)
94 \e$B"*\e(B1
95 \end{verbatim}
96   \end{example}
97 \end{function}
98
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.
103 \end{function}
104
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,
109   
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
113     %% What's table? 
114     calling it with two arguments, each key and value in the table.
115
116     \var{Range}
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
120     range argument to 
121     'put-range-table'.  If omitted or t, it defaults to
122     the entire table.  See Fig~\ref{fig:map-char-attribute}
123     %%mapcaratributes?
124     for an example using this function.    
125 \end{function}
126
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}.
130   
131   This function returns the alist of attributes of \var{character}.
132 \end{function}
133
134 \begin{function}{char-attribute-list}{}
135     You can get the list of character attributes by a builtin function
136     \func{char-attribute-list}.
137     
138     This function returns the list of all existing character
139     attributes.
140 \end{function}
141
142 \begin{function}{encode-char}{character coded-charset \optargs{defined-only}}
143   Return code-point of \var{character} in specified \var{coded-charset}.
144 \end{function}
145
146 \begin{function}{decode-char}{coded-charset code \optargs{defined-only}}
147   Make a character from \var{coded-charset} and code-point \var{code}.
148
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.
151 \end{function}
152
153 \begin{function}{decode-builtin-char}{coded-charset code}
154   Make a builtin character from \var{coded-charset} and code-point \var{code}.
155 \end{function}
156
157 \end{document}
158
159 %%% Local Variables: 
160 %%% mode: latex
161 %%% TeX-master: t
162 %%% End: