-This is Info file ../info/lispref.info, produced by Makeinfo version
-1.68 from the input file lispref/lispref.texi.
+This is ../info/lispref.info, produced by makeinfo version 4.0 from
+lispref/lispref.texi.
INFO-DIR-SECTION XEmacs Editor
START-INFO-DIR-ENTRY
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Level 3 Basics, Next: Level 3 Primitives, Up: I18N Level 3
+
+Level 3 Basics
+--------------
+
+ XEmacs now provides alpha-level functionality for I18N Level 3.
+This means that everything necessary for full messaging is available,
+but not every file has been converted.
+
+ The two message files which have been created are `src/emacs.po' and
+`lisp/packages/mh-e.po'. Both files need to be converted using
+`msgfmt', and the resulting `.mo' files placed in some locale's
+`LC_MESSAGES' directory. The test "translations" in these files are
+the original messages prefixed by `TRNSLT_'.
+
+ The domain for a variable is stored on the variable's property list
+under the property name VARIABLE-DOMAIN. The function
+`documentation-property' uses this information when translating a
+variable's documentation.
+
+\1f
File: lispref.info, Node: Level 3 Primitives, Next: Dynamic Messaging, Prev: Level 3 Basics, Up: I18N Level 3
Level 3 Primitives
------------------
- - Function: gettext STRING
+ - Function: gettext string
This function looks up STRING in the default message domain and
returns its translation. If `I18N3' was not enabled when XEmacs
was compiled, it just returns STRING.
- - Function: dgettext DOMAIN STRING
+ - Function: dgettext domain string
This function looks up STRING in the specified message domain and
returns its translation. If `I18N3' was not enabled when XEmacs
was compiled, it just returns STRING.
- - Function: bind-text-domain DOMAIN PATHNAME
+ - Function: bind-text-domain domain pathname
This function associates a pathname with a message domain. Here's
how the path to message file is constructed under SunOS 5.x:
If `I18N3' was not enabled when XEmacs was compiled, this function
does nothing.
- - Special Form: domain STRING
+ - Special Form: domain string
This function specifies the text domain used for translating
documentation strings and interactive prompts of a function. For
example, write:
The "call" to `domain' is actually a declaration rather than a
function; when actually called, `domain' just returns `nil'.
- - Function: domain-of FUNCTION
+ - Function: domain-of function
This function returns the text domain of FUNCTION; it returns
`nil' if it is the default domain. If `I18N3' was not enabled
when XEmacs was compiled, it always returns `nil'.
For variables and constants which have documentation strings,
specify the domain after the documentation.
- - Special Form: defvar SYMBOL [VALUE [DOC-STRING [DOMAIN]]]
+ - Special Form: defvar symbol [value [doc-string [domain]]]
Example:
(defvar weight 250 "Weight of gorilla, in pounds." "emacs-gorilla")
- - Special Form: defconst SYMBOL [VALUE [DOC-STRING [DOMAIN]]]
+ - Special Form: defconst symbol [value [doc-string [domain]]]
Example:
(defconst limbs 4 "Number of limbs" "emacs-gorilla")
extracted into the main message base. However, for autoloaded functions
which are specified in a separate package, use following syntax:
- - Function: autoload SYMBOL FILENAME &optional DOCSTRING INTERACTIVE
- MACRO DOMAIN
+ - Function: autoload symbol filename &optional docstring interactive
+ macro domain
Example:
(autoload 'explore "jungle" "Explore the jungle." nil nil "emacs-gorilla")
In some cases, the differences will be significant enough that it is
actually possible to identify two or more distinct shapes that both
represent the same character. For example, the lowercase letters `a'
-and `g' each have two distinct possible shapes - the `a' can optionally
+and `g' each have two distinct possible shapes--the `a' can optionally
have a curved tail projecting off the top, and the `g' can be formed
either of two loops, or of one loop and a tail hanging off the bottom.
Such distinct possible shapes of a character are called "glyphs". The
important characteristic of two glyphs making up the same character is
that the choice between one or the other is purely stylistic and has no
linguistic effect on a word (this is the reason why a capital `A' and
-lowercase `a' are different characters rather than different glyphs -
-e.g. `Aspen' is a city while `aspen' is a kind of tree).
+lowercase `a' are different characters rather than different
+glyphs--e.g. `Aspen' is a city while `aspen' is a kind of tree).
Note that "character" and "glyph" are used differently here than
elsewhere in XEmacs.
letters, etc. Note that for many of the Asian character sets, there is
no natural ordering of the characters. The actual orderings are based
on one or more salient characteristic, of which there are many to
-choose from - e.g. number of strokes, common radicals, phonetic
+choose from--e.g. number of strokes, common radicals, phonetic
ordering, etc.
The set of numbers assigned to any particular character are called
has thousands of characters, and is of dimension two - every character
is indexed by two position codes, each in the range 33 through 126.
(Note that the choice of the range here is somewhat arbitrary.
-Although a character set such as JISX0208 defines an *ordering* of all
+Although a character set such as JISX0208 defines an _ordering_ of all
its characters, it does not define the actual mapping between numbers
and characters. You could just as easily index the characters in
JISX0208 using numbers in the range 0 through 93, 1 through 94, 2
not understand the difference between a character set and an encoding.)
This is not possible, however, if more than one character set is to be
used in the encoding. For example, printed Japanese text typically
-requires characters from multiple character sets - ASCII, JISX0208, and
+requires characters from multiple character sets--ASCII, JISX0208, and
JISX0212, to be specific. Each of these is indexed using one or more
position codes in the range 33 through 126, so the position codes could
not be used directly or there would be no way to tell which character
-was meant. Different Japanese encodings handle this differently - JIS
+was meant. Different Japanese encodings handle this differently--JIS
uses special escape characters to denote different character sets; EUC
sets the high bit of the position codes for JISX0208 and JISX0212, and
puts a special extra byte before each JISX0212 character; etc. (JIS,
character set as well as an ordering of those characters. Charsets are
permanent objects and are named using symbols, like faces.
- - Function: charsetp OBJECT
+ - Function: charsetp object
This function returns non-`nil' if OBJECT is a charset.
* Menu:
Basic Charset Functions
-----------------------
- - Function: find-charset CHARSET-OR-NAME
+ - Function: find-charset charset-or-name
This function retrieves the charset of the given name. If
CHARSET-OR-NAME is a charset object, it is simply returned.
Otherwise, CHARSET-OR-NAME should be a symbol. If there is no
such charset, `nil' is returned. Otherwise the associated charset
object is returned.
- - Function: get-charset NAME
+ - Function: get-charset name
This function retrieves the charset of the given name. Same as
`find-charset' except an error is signalled if there is no such
charset instead of returning `nil'.
- Function: charset-list
This function returns a list of the names of all defined charsets.
- - Function: make-charset NAME DOC-STRING PROPS
+ - Function: make-charset name doc-string props
This function defines a new character set. This function is for
use with Mule support. NAME is a symbol, the name by which the
character set is normally referred. DOC-STRING is a string
`chars', `final', `graphic', `direction', and `ccl-program', as
previously described.
- - Function: make-reverse-direction-charset CHARSET NEW-NAME
+ - Function: make-reverse-direction-charset charset new-name
This function makes a charset equivalent to CHARSET but which goes
in the opposite direction. NEW-NAME is the name of the new
charset. The new charset is returned.
- - Function: charset-from-attributes DIMENSION CHARS FINAL &optional
- DIRECTION
+ - Function: charset-from-attributes dimension chars final &optional
+ direction
This function returns a charset with the given DIMENSION, CHARS,
FINAL, and DIRECTION. If DIRECTION is omitted, both directions
will be checked (left-to-right will be returned if character sets
exist for both directions).
- - Function: charset-reverse-direction-charset CHARSET
+ - Function: charset-reverse-direction-charset charset
This function returns the charset (if any) with the same dimension,
number of characters, and final byte as CHARSET, but which is
displayed in the opposite direction.
All of these functions accept either a charset name or charset
object.
- - Function: charset-property CHARSET PROP
+ - Function: charset-property charset prop
This function returns property PROP of CHARSET. *Note Charset
Properties::.
Convenience functions are also provided for retrieving individual
properties of a charset.
- - Function: charset-name CHARSET
+ - Function: charset-name charset
This function returns the name of CHARSET. This will be a symbol.
- - Function: charset-doc-string CHARSET
+ - Function: charset-doc-string charset
This function returns the doc string of CHARSET.
- - Function: charset-registry CHARSET
+ - Function: charset-registry charset
This function returns the registry of CHARSET.
- - Function: charset-dimension CHARSET
+ - Function: charset-dimension charset
This function returns the dimension of CHARSET.
- - Function: charset-chars CHARSET
+ - Function: charset-chars charset
This function returns the number of characters per dimension of
CHARSET.
- - Function: charset-columns CHARSET
+ - Function: charset-columns charset
This function returns the number of display columns per character
(in TTY mode) of CHARSET.
- - Function: charset-direction CHARSET
- This function returns the display direction of CHARSET - either
+ - Function: charset-direction charset
+ This function returns the display direction of CHARSET--either
`l2r' or `r2l'.
- - Function: charset-final CHARSET
+ - Function: charset-final charset
This function returns the final byte of the ISO 2022 escape
sequence designating CHARSET.
- - Function: charset-graphic CHARSET
+ - Function: charset-graphic charset
This function returns either 0 or 1, depending on whether the
position codes of characters in CHARSET map to the left or right
half of their font, respectively.
- - Function: charset-ccl-program CHARSET
+ - Function: charset-ccl-program charset
This function returns the CCL program, if any, for converting
position codes of characters in CHARSET into font indices.
The only property of a charset that can currently be set after the
charset has been created is the CCL program.
- - Function: set-charset-ccl-program CHARSET CCL-PROGRAM
+ - Function: set-charset-ccl-program charset ccl-program
This function sets the `ccl-program' property of CHARSET to
CCL-PROGRAM.
MULE Characters
===============
- - Function: make-char CHARSET ARG1 &optional ARG2
+ - Function: make-char charset arg1 &optional arg2
This function makes a multi-byte character from CHARSET and octets
ARG1 and ARG2.
- - Function: char-charset CH
+ - Function: char-charset ch
This function returns the character set of char CH.
- - Function: char-octet CH &optional N
+ - Function: char-octet ch &optional n
This function returns the octet (i.e. position code) numbered N
(should be 0 or 1) of char CH. N defaults to 0 if omitted.
- - Function: find-charset-region START END &optional BUFFER
+ - Function: find-charset-region start end &optional buffer
This function returns a list of the charsets in the region between
START and END. BUFFER defaults to the current buffer if omitted.
- - Function: find-charset-string STRING
+ - Function: find-charset-string string
This function returns a list of the charsets in STRING.
\1f
Composite characters are not yet completely implemented.
- - Function: make-composite-char STRING
+ - Function: make-composite-char string
This function converts a string into a single composite character.
The character is the result of overstriking all the characters in
the string.
- - Function: composite-char-string CH
+ - Function: composite-char-string ch
This function returns a string of the characters comprising a
composite character.
- - Function: compose-region START END &optional BUFFER
+ - Function: compose-region start end &optional buffer
This function composes the characters in the region from START to
END in BUFFER into one composite character. The composite
character replaces the composed characters. BUFFER defaults to
the current buffer if omitted.
- - Function: decompose-region START END &optional BUFFER
+ - Function: decompose-region start end &optional buffer
This function decomposes any composite characters in the region
from START to END in BUFFER. This converts each composite
character into one or more characters, the individual characters
into 4 areas: C0, GL, C1, and GR. GL and GR are the areas into which a
register of charset can be invoked into.
- C0: 0x00 - 0x1F
- GL: 0x20 - 0x7F
- C1: 0x80 - 0x9F
- GR: 0xA0 - 0xFF
+ C0: 0x00 - 0x1F
+ GL: 0x20 - 0x7F
+ C1: 0x80 - 0x9F
+ GR: 0xA0 - 0xFF
Usually, in the initial state, G0 is invoked into GL, and G1 is
invoked into GR.
Charset designation is done by escape sequences of the form:
- ESC [I] I F
+ ESC [I] I F
where I is an intermediate character in the range 0x20 - 0x2F, and F
is the final character identifying this charset.
The meaning of intermediate characters are:
- $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
- ( [0x28]: designate to G0 a 94-charset whose final byte is F.
- ) [0x29]: designate to G1 a 94-charset whose final byte is F.
- * [0x2A]: designate to G2 a 94-charset whose final byte is F.
- + [0x2B]: designate to G3 a 94-charset whose final byte is F.
- - [0x2D]: designate to G1 a 96-charset whose final byte is F.
- . [0x2E]: designate to G2 a 96-charset whose final byte is F.
- / [0x2F]: designate to G3 a 96-charset whose final byte is F.
+ $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
+ ( [0x28]: designate to G0 a 94-charset whose final byte is F.
+ ) [0x29]: designate to G1 a 94-charset whose final byte is F.
+ * [0x2A]: designate to G2 a 94-charset whose final byte is F.
+ + [0x2B]: designate to G3 a 94-charset whose final byte is F.
+ - [0x2D]: designate to G1 a 96-charset whose final byte is F.
+ . [0x2E]: designate to G2 a 96-charset whose final byte is F.
+ / [0x2F]: designate to G3 a 96-charset whose final byte is F.
The following rule is not allowed in ISO 2022 but can be used in
Mule.
- , [0x2C]: designate to G0 a 96-charset whose final byte is F.
+ , [0x2C]: designate to G0 a 96-charset whose final byte is F.
Here are examples of designations:
- ESC ( B : designate to G0 ASCII
- ESC - A : designate to G1 Latin-1
- ESC $ ( A or ESC $ A : designate to G0 GB2312
- ESC $ ( B or ESC $ B : designate to G0 JISX0208
- ESC $ ) C : designate to G1 KSC5601
+ ESC ( B : designate to G0 ASCII
+ ESC - A : designate to G1 Latin-1
+ ESC $ ( A or ESC $ A : designate to G0 GB2312
+ ESC $ ( B or ESC $ B : designate to G0 JISX0208
+ ESC $ ) C : designate to G1 KSC5601
To use a charset designated to G2 or G3, and to use a charset
designated to G1 in a 7-bit environment, you must explicitly invoke G1,
Locking Shift is done as follows:
- LS0 or SI (0x0F): invoke G0 into GL
- LS1 or SO (0x0E): invoke G1 into GL
- LS2: invoke G2 into GL
- LS3: invoke G3 into GL
- LS1R: invoke G1 into GR
- LS2R: invoke G2 into GR
- LS3R: invoke G3 into GR
+ LS0 or SI (0x0F): invoke G0 into GL
+ LS1 or SO (0x0E): invoke G1 into GL
+ LS2: invoke G2 into GL
+ LS3: invoke G3 into GL
+ LS1R: invoke G1 into GR
+ LS2R: invoke G2 into GR
+ LS3R: invoke G3 into GR
Single Shift is done as follows:
- SS2 or ESC N: invoke G2 into GL
- SS3 or ESC O: invoke G3 into GL
+ SS2 or ESC N: invoke G2 into GL
+ SS3 or ESC O: invoke G3 into GL
(#### Ben says: I think the above is slightly incorrect. It appears
that SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N
Here are several examples:
junet -- Coding system used in JUNET.
- 1. G0 <- ASCII, G1..3 <- never used
- 2. Yes.
- 3. Yes.
- 4. Yes.
- 5. 7-bit environment
- 6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
+ 1. G0 <- ASCII, G1..3 <- never used
+ 2. Yes.
+ 3. Yes.
+ 4. Yes.
+ 5. 7-bit environment
+ 6. No.
+ 7. Use ASCII
+ 8. Use JISX0208-1983
ctext -- Compound Text
- 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used
- 2. No.
- 3. No.
- 4. Yes.
- 5. 8-bit environment
- 6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
+ 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used
+ 2. No.
+ 3. No.
+ 4. Yes.
+ 5. 8-bit environment
+ 6. No.
+ 7. Use ASCII
+ 8. Use JISX0208-1983
euc-china -- Chinese EUC. Although many people call this
as "GB encoding", the name may cause misunderstanding.
- 1. G0 <- ASCII, G1 <- GB2312, G2,3 <- never used
- 2. No.
- 3. Yes.
- 4. Yes.
- 5. 8-bit environment
- 6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
+ 1. G0 <- ASCII, G1 <- GB2312, G2,3 <- never used
+ 2. No.
+ 3. Yes.
+ 4. Yes.
+ 5. 8-bit environment
+ 6. No.
+ 7. Use ASCII
+ 8. Use JISX0208-1983
korean-mail -- Coding system used in Korean network.
- 1. G0 <- ASCII, G1 <- KSC5601, G2,3 <- never used
- 2. No.
- 3. Yes.
- 4. Yes.
- 5. 7-bit environment
- 6. Yes.
- 7. No.
- 8. No.
+ 1. G0 <- ASCII, G1 <- KSC5601, G2,3 <- never used
+ 2. No.
+ 3. Yes.
+ 4. Yes.
+ 5. 7-bit environment
+ 6. Yes.
+ 7. No.
+ 8. No.
Mule creates all these coding systems by default.
For example, many ISO-2022-compliant coding systems (such as Compound
Text, which is used for inter-client data under the X Window System) use
-escape sequences to switch between different charsets - Japanese Kanji,
+escape sequences to switch between different charsets--Japanese Kanji,
for example, is invoked with `ESC $ ( B'; ASCII is invoked with `ESC (
B'; and Cyrillic is invoked with `ESC - L'. See `make-coding-system'
for more information.
a coding system is called for. (This is similar to how faces and
charsets work.)
- - Function: coding-system-p OBJECT
+ - Function: coding-system-p object
This function returns non-`nil' if OBJECT is a coding system.
* Menu:
Basic Coding System Functions
-----------------------------
- - Function: find-coding-system CODING-SYSTEM-OR-NAME
+ - Function: find-coding-system coding-system-or-name
This function retrieves the coding system of the given name.
If CODING-SYSTEM-OR-NAME is a coding-system object, it is simply
If there is no such coding system, `nil' is returned. Otherwise
the associated coding system object is returned.
- - Function: get-coding-system NAME
+ - Function: get-coding-system name
This function retrieves the coding system of the given name. Same
as `find-coding-system' except an error is signalled if there is no
such coding system instead of returning `nil'.
This function returns a list of the names of all defined coding
systems.
- - Function: coding-system-name CODING-SYSTEM
+ - Function: coding-system-name coding-system
This function returns the name of the given coding system.
- - Function: make-coding-system NAME TYPE &optional DOC-STRING PROPS
+ - Function: make-coding-system name type &optional doc-string props
This function registers symbol NAME as a coding system.
TYPE describes the conversion method used and should be one of the
character set. Recognized properties are as in *Note Coding
System Properties::.
- - Function: copy-coding-system OLD-CODING-SYSTEM NEW-NAME
+ - Function: copy-coding-system old-coding-system new-name
This function copies OLD-CODING-SYSTEM to NEW-NAME. If NEW-NAME
does not name an existing coding system, a new one will be created.
- - Function: subsidiary-coding-system CODING-SYSTEM EOL-TYPE
+ - Function: subsidiary-coding-system coding-system eol-type
This function returns the subsidiary coding system of
CODING-SYSTEM with eol type EOL-TYPE.
Coding System Property Functions
--------------------------------
- - Function: coding-system-doc-string CODING-SYSTEM
+ - Function: coding-system-doc-string coding-system
This function returns the doc string for CODING-SYSTEM.
- - Function: coding-system-type CODING-SYSTEM
+ - Function: coding-system-type coding-system
This function returns the type of CODING-SYSTEM.
- - Function: coding-system-property CODING-SYSTEM PROP
+ - Function: coding-system-property coding-system prop
This function returns the PROP property of CODING-SYSTEM.
\1f
Encoding and Decoding Text
--------------------------
- - Function: decode-coding-region START END CODING-SYSTEM &optional
- BUFFER
+ - Function: decode-coding-region start end coding-system &optional
+ buffer
This function decodes the text between START and END which is
encoded in CODING-SYSTEM. This is useful if you've read in
encoded text from a file without decoding it (e.g. you read in a
encoded text is returned. BUFFER defaults to the current buffer
if unspecified.
- - Function: encode-coding-region START END CODING-SYSTEM &optional
- BUFFER
+ - Function: encode-coding-region start end coding-system &optional
+ buffer
This function encodes the text between START and END using
CODING-SYSTEM. This will, for example, convert Japanese
characters into stuff such as `^[$B!<!+^[(B' if you use the JIS
encoding. The length of the encoded text is returned. BUFFER
defaults to the current buffer if unspecified.
-\1f
-File: lispref.info, Node: Detection of Textual Encoding, Next: Big5 and Shift-JIS Functions, Prev: Encoding and Decoding Text, Up: Coding Systems
-
-Detection of Textual Encoding
------------------------------
-
- - Function: coding-category-list
- This function returns a list of all recognized coding categories.
-
- - Function: set-coding-priority-list LIST
- This function changes the priority order of the coding categories.
- LIST should be a list of coding categories, in descending order of
- priority. Unspecified coding categories will be lower in priority
- than all specified ones, in the same relative order they were in
- previously.
-
- - Function: coding-priority-list
- This function returns a list of coding categories in descending
- order of priority.
-
- - Function: set-coding-category-system CODING-CATEGORY CODING-SYSTEM
- This function changes the coding system associated with a coding
- category.
-
- - Function: coding-category-system CODING-CATEGORY
- This function returns the coding system associated with a coding
- category.
-
- - Function: detect-coding-region START END &optional BUFFER
- This function detects coding system of the text in the region
- between START and END. Returned value is a list of possible coding
- systems ordered by priority. If only ASCII characters are found,
- it returns `autodetect' or one of its subsidiary coding systems
- according to a detected end-of-line type. Optional arg BUFFER
- defaults to the current buffer.
-