New file.
[chise/specs.git] / chise-elisp_ja.tex
diff --git a/chise-elisp_ja.tex b/chise-elisp_ja.tex
new file mode 100644 (file)
index 0000000..ee3efdd
--- /dev/null
@@ -0,0 +1,149 @@
+\documentclass[a4j]{jarticle}
+
+\title{XEmacs UTF-2000 API}
+\author{\e$B<i2,\e(B \e$BCNI'\e(B}
+\date{}
+
+\newenvironment{function}[2]
+{\vspace{0.3em}\noindent{\textbf{\e$B4X?t\e(B #1} (\textit{#2})}\vspace{-0.5em}\begin{quote}}
+{\end{quote}}
+
+\newenvironment{example}
+{\begin{description}\item [\e$B!NNc!O\e(B]}
+{\end{description}}
+
+\newcommand{\optargs}[1]{{\sl\textbf{\&optional}} #1}
+
+\newcommand{\var}[1]{\textit{#1}}
+
+\newcommand{\sym}[1]{\textsf{#1}}
+
+\newcommand{\func}[1]{\sym{#1}}
+
+\begin{document}
+
+\maketitle
+
+\begin{function}{define-char}{char-spec}
+  \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
+  \e$B$=$NJ8;z%*%V%8%'%/%H$rJV$9!#\e(B
+
+  \e$BJ8;zB0@-$N=89g\e(B \var{char-spec} \e$B$OO"A[%j%9%H$G$"$k!#\e(B
+
+  \begin{example}
+\begin{verbatim}
+(define-char
+  '((name               . "CJK RADICAL SECOND TWO")
+    (general-category   symbol other) ; Informative Category
+    (bidi-category      . "ON")
+    (mirrored           . nil)
+    (total-strokes       . 1)
+    (<-radical
+     ((ucs                . #x4E5A)
+      ))
+    (ideograph-cdp      . -21)
+    (chinese-big5-cdp   . #x8C5D)
+    (ucs                . #x2E83)
+    ))
+\end{verbatim}
+    %% \e$B$3$NNc!"\e(Bline by line \e$B$N@bL@$,$[$7$$!#\e(B
+  \end{example}
+\end{function}
+
+\begin{function}{get-char-attribute}
+        {character attribute \optargs{default-value}}
+  \e$BJ8;z%*%V%8%'%/%H\e(B \var{character} \e$B$NB0@-\e(B \var{attribute} \e$B$N\e(B
+  \e$BCM$rJV$9!#\e(B
+
+  Return \var{default-value} if the value is not exist.
+
+  \begin{example}
+\begin{verbatim}
+(get-char-attribute ?\e$B$"\e(B 'name)
+\e$B"*\e(B "HIRAGANA LETTER A"
+\end{verbatim}
+    \end{example}
+    %% \e$B>e$HF1$8Nc$r;H$&$[$&$,?F@Z$+$b!#!V$"!W$C$F8+$?$3$H$J$$?M$K$bFI\e(B
+    %% \e$B$^$;$k$J$i!#\e(B
+\end{function}
+
+\begin{function}{put-char-attribute}{character attribute value}
+  \e$BJ8;z%*%V%8%'%/%H\e(B \var{character} \e$B$NB0@-\e(B \var{attribute} \e$B$N\e(B
+  \e$BCM$r\e(B \var{value} \e$B$K@_Dj$9$k!#\e(B
+
+  \begin{example}
+\begin{verbatim}
+(get-char-attribute ?\e$B$"\e(B 'foo)
+\e$B"*\e(Bnil
+(put-char-attribute ?\e$B$"\e(B 'foo 1)
+\e$B"*\e(B1
+(get-char attribute ?\e$B$"\e(B 'foo)
+\e$B"*\e(B1
+\end{verbatim}
+  \end{example}
+\end{function}
+
+\begin{function}{find-char}{attributes}
+  In order to find a character object by a character \var{attribute},
+    a builtin function \func{find-char} may be convenient.  This
+    function retrieves the character that has specified attributes.
+\end{function}
+
+\begin{function}{map-char-attribute}{function attribute \optargs{range}}
+    A map function for character attributes is also available.  This
+    function is useful in finding characters with a character
+    attribute, or processing by a character attribute,
+  
+    This function maps \var{function} over entries in \var{attribute},
+    %% \e$B0J2<$O\e(Battribute ((key value) \e$B$N%j%9%H\e(B)\e$B$NA4MWAG$KBP$7$F\e(B  function
+    %% (key value) \e$B$r8F$V!#$G$$$$$N!)\e(B
+    %% What's table? 
+    calling it with two arguments, each key and value in the table.
+
+    \var{Range}
+    specifies a subrange to map over and 
+    %% \e$B0lHL$NFI<T$O\e(B XEmacsLisp \e$B$OCN$i$J$$!#\e(B
+    is in the same format as the
+    range argument to 
+    'put-range-table'.  If omitted or t, it defaults to
+    the entire table.  See Fig~\ref{fig:map-char-attribute}
+    %%mapcaratributes?
+    for an example using this function.    
+\end{function}
+
+\begin{function}{char-attribute-alist}{character}
+  You can get every attributes of a character as an association-list
+  by a built-in function \var{char-attribute-alist}.
+  
+  This function returns the alist of attributes of \var{character}.
+\end{function}
+
+\begin{function}{char-attribute-list}{}
+    You can get the list of character attributes by a builtin function
+    \func{char-attribute-list}.
+    
+    This function returns the list of all existing character
+    attributes.
+\end{function}
+
+\begin{function}{encode-char}{character coded-charset \optargs{defined-only}}
+  Return code-point of \var{character} in specified \var{coded-charset}.
+\end{function}
+
+\begin{function}{decode-char}{coded-charset code \optargs{defined-only}}
+  Make a character from \var{coded-charset} and code-point \var{code}.
+
+  If \var{defined-only} is non-\sym{nil}, builtin character is not returned.
+  If corresponding character is not found, \sym{nil} is returned.
+\end{function}
+
+\begin{function}{decode-builtin-char}{coded-charset code}
+  Make a builtin character from \var{coded-charset} and code-point \var{code}.
+\end{function}
+
+\end{document}
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: t
+%%% End: