comparison man/lispref/mule.texi @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children 7d972c3de90a
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
45 same. But consider the works of Scott Kim; human beings can recognize 45 same. But consider the works of Scott Kim; human beings can recognize
46 hugely variant shapes as the "same" character. Sometimes, especially 46 hugely variant shapes as the "same" character. Sometimes, especially
47 where characters are extremely complicated to write, completely 47 where characters are extremely complicated to write, completely
48 different shapes may be defined as the "same" character in national 48 different shapes may be defined as the "same" character in national
49 standards. The Taiwanese variant of Hanzi is generally the most 49 standards. The Taiwanese variant of Hanzi is generally the most
50 complicated; over the centuries, the Japanese, Koreans, and the People's 50 complicated; over the centuries, the Japanese, Koreans, and the People's
51 Republic of China have adopted simplifications of the shape, but the 51 Republic of China have adopted simplifications of the shape, but the
52 line of descent from the original shape is recorded, and the meanings 52 line of descent from the original shape is recorded, and the meanings
53 and pronunciation of different forms of the same character are 53 and pronunciation of different forms of the same character are
54 considered to be identical within each language. (Of course, it may 54 considered to be identical within each language. (Of course, it may
55 take a specialist to recognize the related form; the point is that the 55 take a specialist to recognize the related form; the point is that the
397 397
398 @defun charset-name charset 398 @defun charset-name charset
399 This function returns the name of @var{charset}. This will be a symbol. 399 This function returns the name of @var{charset}. This will be a symbol.
400 @end defun 400 @end defun
401 401
402 @defun charset-doc-string charset 402 @defun charset-description charset
403 This function returns the doc string of @var{charset}. 403 This function returns the documentation string of @var{charset}.
404 @end defun 404 @end defun
405 405
406 @defun charset-registry charset 406 @defun charset-registry charset
407 This function returns the registry of @var{charset}. 407 This function returns the registry of @var{charset}.
408 @end defun 408 @end defun
414 @defun charset-chars charset 414 @defun charset-chars charset
415 This function returns the number of characters per dimension of 415 This function returns the number of characters per dimension of
416 @var{charset}. 416 @var{charset}.
417 @end defun 417 @end defun
418 418
419 @defun charset-columns charset 419 @defun charset-width charset
420 This function returns the number of display columns per character (in 420 This function returns the number of display columns per character (in
421 TTY mode) of @var{charset}. 421 TTY mode) of @var{charset}.
422 @end defun 422 @end defun
423 423
424 @defun charset-direction charset 424 @defun charset-direction charset
425 This function returns the display direction of @var{charset}---either 425 This function returns the display direction of @var{charset}---either
426 @code{l2r} or @code{r2l}. 426 @code{l2r} or @code{r2l}.
427 @end defun 427 @end defun
428 428
429 @defun charset-final charset 429 @defun charset-iso-final-char charset
430 This function returns the final byte of the ISO 2022 escape sequence 430 This function returns the final byte of the ISO 2022 escape sequence
431 designating @var{charset}. 431 designating @var{charset}.
432 @end defun 432 @end defun
433 433
434 @defun charset-graphic charset 434 @defun charset-iso-graphic-plane charset
435 This function returns either 0 or 1, depending on whether the position 435 This function returns either 0 or 1, depending on whether the position
436 codes of characters in @var{charset} map to the left or right half 436 codes of characters in @var{charset} map to the left or right half
437 of their font, respectively. 437 of their font, respectively.
438 @end defun 438 @end defun
439 439
518 @defun make-char charset arg1 &optional arg2 518 @defun make-char charset arg1 &optional arg2
519 This function makes a multi-byte character from @var{charset} and octets 519 This function makes a multi-byte character from @var{charset} and octets
520 @var{arg1} and @var{arg2}. 520 @var{arg1} and @var{arg2}.
521 @end defun 521 @end defun
522 522
523 @defun char-charset ch 523 @defun char-charset character
524 This function returns the character set of char @var{ch}. 524 This function returns the character set of char @var{character}.
525 @end defun 525 @end defun
526 526
527 @defun char-octet ch &optional n 527 @defun char-octet character &optional n
528 This function returns the octet (i.e. position code) numbered @var{n} 528 This function returns the octet (i.e. position code) numbered @var{n}
529 (should be 0 or 1) of char @var{ch}. @var{n} defaults to 0 if omitted. 529 (should be 0 or 1) of char @var{character}. @var{n} defaults to 0 if omitted.
530 @end defun 530 @end defun
531 531
532 @defun find-charset-region start end &optional buffer 532 @defun find-charset-region start end &optional buffer
533 This function returns a list of the charsets in the region between 533 This function returns a list of the charsets in the region between
534 @var{start} and @var{end}. @var{buffer} defaults to the current buffer 534 @var{start} and @var{end}. @var{buffer} defaults to the current buffer
548 This function converts a string into a single composite character. The 548 This function converts a string into a single composite character. The
549 character is the result of overstriking all the characters in the 549 character is the result of overstriking all the characters in the
550 string. 550 string.
551 @end defun 551 @end defun
552 552
553 @defun composite-char-string ch 553 @defun composite-char-string character
554 This function returns a string of the characters comprising a composite 554 This function returns a string of the characters comprising a composite
555 character. 555 character.
556 @end defun 556 @end defun
557 557
558 @defun compose-region start end &optional buffer 558 @defun compose-region start end &optional buffer
700 character set and UTF-8, for example). 700 character set and UTF-8, for example).
701 701
702 ISO 2022 provides for switching between character sets via escape 702 ISO 2022 provides for switching between character sets via escape
703 sequences. This switching is somewhat complicated, because ISO 2022 703 sequences. This switching is somewhat complicated, because ISO 2022
704 provides for both legacy applications like Internet mail that accept 704 provides for both legacy applications like Internet mail that accept
705 only 7 significant bits in some contexts (RFC 822 headers, for example), 705 only 7 significant bits in some contexts (RFC 822 headers, for example),
706 and more modern "8-bit clean" applications. It also provides for 706 and more modern "8-bit clean" applications. It also provides for
707 compact and transparent representation of languages like Japanese which 707 compact and transparent representation of languages like Japanese which
708 mix ASCII and a national script (even outside of computer programs). 708 mix ASCII and a national script (even outside of computer programs).
709 709
710 First, ISO 2022 codified prevailing practice by dividing the code space 710 First, ISO 2022 codified prevailing practice by dividing the code space
717 717
718 The various regions are given the name C0 (0x00-0x1F), GL (0x20-0x7F), 718 The various regions are given the name C0 (0x00-0x1F), GL (0x20-0x7F),
719 C1 (0x80-0x9F), and GR (0xA0-0xFF). GL and GR stand for "graphic left" 719 C1 (0x80-0x9F), and GR (0xA0-0xFF). GL and GR stand for "graphic left"
720 and "graphic right", respectively, because of the standard method of 720 and "graphic right", respectively, because of the standard method of
721 displaying graphic character sets in tables with the high byte indexing 721 displaying graphic character sets in tables with the high byte indexing
722 columns and the low byte indexing rows. I don't find it very intuitive, 722 columns and the low byte indexing rows. I don't find it very intuitive,
723 but these are called "registers". 723 but these are called "registers".
724 724
725 An ISO 2022-conformant encoding for a graphic character set must use a 725 An ISO 2022-conformant encoding for a graphic character set must use a
726 fixed number of bytes per character, and the values must fit into a 726 fixed number of bytes per character, and the values must fit into a
727 single register; that is, each byte must range over either 0x20-0x7F, or 727 single register; that is, each byte must range over either 0x20-0x7F, or
888 characters (from C1) in 8 bit environments and by escape sequences in 7 888 characters (from C1) in 8 bit environments and by escape sequences in 7
889 bit environments. 889 bit environments.
890 890
891 (#### Ben says: I think the above is slightly incorrect. It appears that 891 (#### Ben says: I think the above is slightly incorrect. It appears that
892 SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N and 892 SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N and
893 ESC O behave as indicated. The above definitions will not parse 893 ESC O behave as indicated. The above definitions will not parse
894 EUC-encoded text correctly, and it looks like the code in mule-coding.c 894 EUC-encoded text correctly, and it looks like the code in mule-coding.c
895 has similar problems.) 895 has similar problems.)
896 896
897 Evidently there are a lot of ISO-2022-compliant ways of encoding 897 Evidently there are a lot of ISO-2022-compliant ways of encoding
898 multilingual text. Now, in the world, there exist many coding systems 898 multilingual text. Now, in the world, there exist many coding systems
1019 @item eol-type 1019 @item eol-type
1020 End-of-line conversion to be used. It should be one of the types 1020 End-of-line conversion to be used. It should be one of the types
1021 listed in @ref{EOL Conversion}. 1021 listed in @ref{EOL Conversion}.
1022 1022
1023 @item eol-lf 1023 @item eol-lf
1024 The coding system which is the same as this one, except that it uses the 1024 The coding system which is the same as this one, except that it uses the
1025 Unix line-breaking convention. 1025 Unix line-breaking convention.
1026 1026
1027 @item eol-crlf 1027 @item eol-crlf
1028 The coding system which is the same as this one, except that it uses the 1028 The coding system which is the same as this one, except that it uses the
1029 DOS line-breaking convention. 1029 DOS line-breaking convention.
1030 1030
1031 @item eol-cr 1031 @item eol-cr
1032 The coding system which is the same as this one, except that it uses the 1032 The coding system which is the same as this one, except that it uses the
1033 Macintosh line-breaking convention. 1033 Macintosh line-breaking convention.
1034 1034
1035 @item post-read-conversion 1035 @item post-read-conversion
1036 Function called after a file has been read in, to perform the decoding. 1036 Function called after a file has been read in, to perform the decoding.
1037 Called with two arguments, @var{beg} and @var{end}, denoting a region of 1037 Called with two arguments, @var{start} and @var{end}, denoting a region of
1038 the current buffer to be decoded. 1038 the current buffer to be decoded.
1039 1039
1040 @item pre-write-conversion 1040 @item pre-write-conversion
1041 Function called before a file is written out, to perform the encoding. 1041 Function called before a file is written out, to perform the encoding.
1042 Called with two arguments, @var{beg} and @var{end}, denoting a region of 1042 Called with two arguments, @var{start} and @var{end}, denoting a region of
1043 the current buffer to be encoded. 1043 the current buffer to be encoded.
1044 @end table 1044 @end table
1045 1045
1046 The following additional properties are recognized if @var{type} is 1046 The following additional properties are recognized if @var{type} is
1047 @code{iso2022}: 1047 @code{iso2022}:
1096 1096
1097 @item no-iso6429 1097 @item no-iso6429
1098 If non-@code{nil}, don't use ISO6429's direction specification. 1098 If non-@code{nil}, don't use ISO6429's direction specification.
1099 1099
1100 @item escape-quoted 1100 @item escape-quoted
1101 If non-nil, literal control characters that are the same as the 1101 If non-@code{nil}, literal control characters that are the same as the
1102 beginning of a recognized ISO 2022 or ISO 6429 escape sequence (in 1102 beginning of a recognized ISO 2022 or ISO 6429 escape sequence (in
1103 particular, ESC (0x1B), SO (0x0E), SI (0x0F), SS2 (0x8E), SS3 (0x8F), 1103 particular, ESC (0x1B), SO (0x0E), SI (0x0F), SS2 (0x8E), SS3 (0x8F),
1104 and CSI (0x9B)) are ``quoted'' with an escape character so that they can 1104 and CSI (0x9B)) are ``quoted'' with an escape character so that they can
1105 be properly distinguished from an escape sequence. (Note that doing 1105 be properly distinguished from an escape sequence. (Note that doing
1106 this results in a non-portable encoding.) This encoding flag is used for 1106 this results in a non-portable encoding.) This encoding flag is used for
1272 This function decodes a JIS X 0208 character of Shift-JIS coding-system. 1272 This function decodes a JIS X 0208 character of Shift-JIS coding-system.
1273 @var{code} is the character code in Shift-JIS as a cons of type bytes. 1273 @var{code} is the character code in Shift-JIS as a cons of type bytes.
1274 The corresponding character is returned. 1274 The corresponding character is returned.
1275 @end defun 1275 @end defun
1276 1276
1277 @defun encode-shift-jis-char ch 1277 @defun encode-shift-jis-char character
1278 This function encodes a JIS X 0208 character @var{ch} to SHIFT-JIS 1278 This function encodes a JIS X 0208 character @var{character} to
1279 coding-system. The corresponding character code in SHIFT-JIS is 1279 SHIFT-JIS coding-system. The corresponding character code in SHIFT-JIS
1280 returned as a cons of two bytes. 1280 is returned as a cons of two bytes.
1281 @end defun 1281 @end defun
1282 1282
1283 @defun decode-big5-char code 1283 @defun decode-big5-char code
1284 This function decodes a Big5 character @var{code} of BIG5 coding-system. 1284 This function decodes a Big5 character @var{code} of BIG5 coding-system.
1285 @var{code} is the character code in BIG5. The corresponding character 1285 @var{code} is the character code in BIG5. The corresponding character
1286 is returned. 1286 is returned.
1287 @end defun 1287 @end defun
1288 1288
1289 @defun encode-big5-char ch 1289 @defun encode-big5-char character
1290 This function encodes the Big5 character @var{char} to BIG5 1290 This function encodes the Big5 character @var{character} to BIG5
1291 coding-system. The corresponding character code in Big5 is returned. 1291 coding-system. The corresponding character code in Big5 is returned.
1292 @end defun 1292 @end defun
1293 1293
1294 @node Predefined Coding Systems, , Big5 and Shift-JIS Functions, Coding Systems 1294 @node Predefined Coding Systems, , Big5 and Shift-JIS Functions, Coding Systems
1295 @subsection Coding Systems Implemented 1295 @subsection Coding Systems Implemented
1296 1296
1297 MULE initializes most of the commonly used coding systems at XEmacs's 1297 MULE initializes most of the commonly used coding systems at XEmacs's
1298 startup. A few others are initialized only when the relevant language 1298 startup. A few others are initialized only when the relevant language
1299 environment is selected and support libraries are loaded. (NB: The 1299 environment is selected and support libraries are loaded. (NB: The
1300 following list is based on XEmacs 21.2.19, the development branch at the 1300 following list is based on XEmacs 21.2.19, the development branch at the
1301 time of writing. The list may be somewhat different for other 1301 time of writing. The list may be somewhat different for other
1302 versions. Recent versions of GNU Emacs 20 implement a few more rare 1302 versions. Recent versions of GNU Emacs 20 implement a few more rare
1303 coding systems; work is being done to port these to XEmacs.) 1303 coding systems; work is being done to port these to XEmacs.)
1304 1304
1305 Unfortunately, there is not a consistent naming convention for character 1305 Unfortunately, there is not a consistent naming convention for character
1306 sets, and for practical purposes coding systems often take their name 1306 sets, and for practical purposes coding systems often take their name
1307 from their principal character sets (ASCII, KOI8-R, Shift JIS). Others 1307 from their principal character sets (ASCII, KOI8-R, Shift JIS). Others
1308 take their names from the coding system (ISO-2022-JP, EUC-KR), and a few 1308 take their names from the coding system (ISO-2022-JP, EUC-KR), and a few
1309 from their non-text usages (internal, binary). To provide for this, and 1309 from their non-text usages (internal, binary). To provide for this, and
1310 for the fact that many coding systems have several common names, an 1310 for the fact that many coding systems have several common names, an
1311 aliasing system is provided. Finally, some effort has been made to use 1311 aliasing system is provided. Finally, some effort has been made to use
1312 names that are registered as MIME charsets (this is why the name 1312 names that are registered as MIME charsets (this is why the name
1313 'shift_jis contains that un-Lisp-y underscore). 1313 'shift_jis contains that un-Lisp-y underscore).
1314 1314
1335 1335
1336 ### SJT 1999-08-23 Maybe should order these by language? Definitely 1336 ### SJT 1999-08-23 Maybe should order these by language? Definitely
1337 need language usage for the ISO-8859 family. 1337 need language usage for the ISO-8859 family.
1338 1338
1339 Note that although true coding system aliases have been implemented for 1339 Note that although true coding system aliases have been implemented for
1340 XEmacs 21.2, the coding system initialization has not yet been converted 1340 XEmacs 21.2, the coding system initialization has not yet been converted
1341 as of 21.2.19. So coding systems described as aliases have the same 1341 as of 21.2.19. So coding systems described as aliases have the same
1342 properties as the aliased coding system, but will not be equal as Lisp 1342 properties as the aliased coding system, but will not be equal as Lisp
1343 objects. 1343 objects.
1344 1344
1345 @table @code 1345 @table @code
1669 by the CCL interpreter embedded in Emacs. The CCL interpreter 1669 by the CCL interpreter embedded in Emacs. The CCL interpreter
1670 implements a virtual machine with 8 registers called @code{r0}, ..., 1670 implements a virtual machine with 8 registers called @code{r0}, ...,
1671 @code{r7}, a number of control structures, and some I/O operators. Take 1671 @code{r7}, a number of control structures, and some I/O operators. Take
1672 care when using registers @code{r0} (used in implicit @dfn{set} 1672 care when using registers @code{r0} (used in implicit @dfn{set}
1673 statements) and especially @code{r7} (used internally by several 1673 statements) and especially @code{r7} (used internally by several
1674 statements and operations, especially for multiple return values and I/O 1674 statements and operations, especially for multiple return values and I/O
1675 operations). 1675 operations).
1676 1676
1677 CCL is used for code conversion during process I/O and file I/O for 1677 CCL is used for code conversion during process I/O and file I/O for
1678 non-ISO2022 coding systems. (It is the only way for a user to specify a 1678 non-ISO2022 coding systems. (It is the only way for a user to specify a
1679 code conversion function.) It is also used for calculating the code 1679 code conversion function.) It is also used for calculating the code
1705 there is input remaining, and an optional @dfn{EOF block} which is 1705 there is input remaining, and an optional @dfn{EOF block} which is
1706 executed when the input is exhausted. Both the main block and the EOF 1706 executed when the input is exhausted. Both the main block and the EOF
1707 block are CCL blocks. 1707 block are CCL blocks.
1708 1708
1709 A @dfn{CCL block} is either a CCL statement or list of CCL statements. 1709 A @dfn{CCL block} is either a CCL statement or list of CCL statements.
1710 A @dfn{CCL statement} is either a @dfn{set statement} (either an integer 1710 A @dfn{CCL statement} is either a @dfn{set statement} (either an integer
1711 or an @dfn{assignment}, which is a list of a register to receive the 1711 or an @dfn{assignment}, which is a list of a register to receive the
1712 assignment, an assignment operator, and an expression) or a @dfn{control 1712 assignment, an assignment operator, and an expression) or a @dfn{control
1713 statement} (a list starting with a keyword, whose allowable syntax 1713 statement} (a list starting with a keyword, whose allowable syntax
1714 depends on the keyword). 1714 depends on the keyword).
1715 1715
1716 @menu 1716 @menu
1717 * CCL Syntax:: CCL program syntax in BNF notation. 1717 * CCL Syntax:: CCL program syntax in BNF notation.
1802 the form @code{(r0 = @var{integer})}. 1802 the form @code{(r0 = @var{integer})}.
1803 1803
1804 @heading I/O statements: 1804 @heading I/O statements:
1805 1805
1806 The @dfn{read} statement takes one or more registers as arguments. It 1806 The @dfn{read} statement takes one or more registers as arguments. It
1807 reads one byte (a C char) from the input into each register in turn. 1807 reads one byte (a C char) from the input into each register in turn.
1808 1808
1809 The @dfn{write} takes several forms. In the form @samp{(write @var{reg} 1809 The @dfn{write} takes several forms. In the form @samp{(write @var{reg}
1810 ...)} it takes one or more registers as arguments and writes each in 1810 ...)} it takes one or more registers as arguments and writes each in
1811 turn to the output. The integer in a register (interpreted as an 1811 turn to the output. The integer in a register (interpreted as an
1812 Emchar) is encoded to multibyte form (ie, Bufbytes) and written to the 1812 Emchar) is encoded to multibyte form (ie, Bufbytes) and written to the
1839 blocks as arguments. The CCL blocks are treated as a zero-indexed 1839 blocks as arguments. The CCL blocks are treated as a zero-indexed
1840 array, and the @code{branch} statement uses the @var{expression} as the 1840 array, and the @code{branch} statement uses the @var{expression} as the
1841 index of the CCL block to execute. Null CCL blocks may be used as 1841 index of the CCL block to execute. Null CCL blocks may be used as
1842 no-ops, continuing execution with the statement following the 1842 no-ops, continuing execution with the statement following the
1843 @code{branch} statement in the containing CCL block. Out-of-range 1843 @code{branch} statement in the containing CCL block. Out-of-range
1844 values for the @var{EXPRESSION} are also treated as no-ops. 1844 values for the @var{expression} are also treated as no-ops.
1845 1845
1846 The @dfn{read-branch} variant of the @dfn{branch} statement takes an 1846 The @dfn{read-branch} variant of the @dfn{branch} statement takes an
1847 @var{register}, a @var{CCL block}, and an optional @var{second CCL 1847 @var{register}, a @var{CCL block}, and an optional @var{second CCL
1848 block} as arguments. The @code{read-branch} statement first reads from 1848 block} as arguments. The @code{read-branch} statement first reads from
1849 the input into the @var{register}, then conditionally executes a CCL 1849 the input into the @var{register}, then conditionally executes a CCL
1850 block just as the @code{branch} statement does. 1850 block just as the @code{branch} statement does.
1851 1851
1852 @heading Loop control statements: 1852 @heading Loop control statements:
1853 1853
1854 The @dfn{loop} statement creates a block with an implied jump from the 1854 The @dfn{loop} statement creates a block with an implied jump from the
1855 end of the block back to its head. The loop is exited on a @code{break} 1855 end of the block back to its head. The loop is exited on a @code{break}
1856 statement, and continued without executing the tail by a @code{repeat} 1856 statement, and continued without executing the tail by a @code{repeat}
1857 statement. 1857 statement.
1858 1858
1859 The @dfn{break} statement, written @samp{(break)}, terminates the 1859 The @dfn{break} statement, written @samp{(break)}, terminates the
1860 current loop and continues with the next statement in the current 1860 current loop and continues with the next statement in the current
1861 block. 1861 block.
1862 1862
1863 The @dfn{repeat} statement has three variants, @code{repeat}, 1863 The @dfn{repeat} statement has three variants, @code{repeat},
1864 @code{write-repeat}, and @code{write-read-repeat}. Each continues the 1864 @code{write-repeat}, and @code{write-read-repeat}. Each continues the
1865 current loop from its head, possibly after performing I/O. 1865 current loop from its head, possibly after performing I/O.
1866 @code{repeat} takes no arguments and does no I/O before jumping. 1866 @code{repeat} takes no arguments and does no I/O before jumping.
1867 @code{write-repeat} takes a single argument (a register, an 1867 @code{write-repeat} takes a single argument (a register, an
1868 integer, or a string), writes it to the output, then jumps. 1868 integer, or a string), writes it to the output, then jumps.
1869 @code{write-read-repeat} takes one or two arguments. The first must 1869 @code{write-read-repeat} takes one or two arguments. The first must
1870 be a register. The second may be an integer or an array; if absent, it 1870 be a register. The second may be an integer or an array; if absent, it
1871 is implicitly set to the first (register) argument. 1871 is implicitly set to the first (register) argument.
1872 @code{write-read-repeat} writes its second argument to the output, then 1872 @code{write-read-repeat} writes its second argument to the output, then
1948 other CCL programs, and from Lisp using these functions: 1948 other CCL programs, and from Lisp using these functions:
1949 1949
1950 @defun ccl-execute ccl-program status 1950 @defun ccl-execute ccl-program status
1951 Execute @var{ccl-program} with registers initialized by 1951 Execute @var{ccl-program} with registers initialized by
1952 @var{status}. @var{ccl-program} is a vector of compiled CCL code 1952 @var{status}. @var{ccl-program} is a vector of compiled CCL code
1953 created by @code{ccl-compile}. It is an error for the program to try to 1953 created by @code{ccl-compile}. It is an error for the program to try to
1954 execute a CCL I/O command. @var{status} must be a vector of nine 1954 execute a CCL I/O command. @var{status} must be a vector of nine
1955 values, specifying the initial value for the R0, R1 .. R7 registers and 1955 values, specifying the initial value for the R0, R1 .. R7 registers and
1956 for the instruction counter IC. A @code{nil} value for a register 1956 for the instruction counter IC. A @code{nil} value for a register
1957 initializer causes the register to be set to 0. A @code{nil} value for 1957 initializer causes the register to be set to 0. A @code{nil} value for
1958 the IC initializer causes execution to start at the beginning of the 1958 the IC initializer causes execution to start at the beginning of the
1959 program. When the program is done, @var{status} is modified (by 1959 program. When the program is done, @var{status} is modified (by
1960 side-effect) to contain the ending values for the corresponding 1960 side-effect) to contain the ending values for the corresponding
1961 registers and IC. 1961 registers and IC.
1962 @end defun 1962 @end defun
1963 1963
1964 @defun ccl-execute-on-string ccl-program status str &optional continue 1964 @defun ccl-execute-on-string ccl-program status string &optional continue
1965 Execute @var{ccl-program} with initial @var{status} on 1965 Execute @var{ccl-program} with initial @var{status} on
1966 @var{string}. @var{ccl-program} is a vector of compiled CCL code 1966 @var{string}. @var{ccl-program} is a vector of compiled CCL code
1967 created by @code{ccl-compile}. @var{status} must be a vector of nine 1967 created by @code{ccl-compile}. @var{status} must be a vector of nine
1968 values, specifying the initial value for the R0, R1 .. R7 registers and 1968 values, specifying the initial value for the R0, R1 .. R7 registers and
1969 for the instruction counter IC. A @code{nil} value for a register 1969 for the instruction counter IC. A @code{nil} value for a register
1970 initializer causes the register to be set to 0. A @code{nil} value for 1970 initializer causes the register to be set to 0. A @code{nil} value for
1971 the IC initializer causes execution to start at the beginning of the 1971 the IC initializer causes execution to start at the beginning of the
1972 program. An optional fourth argument @var{continue}, if non-nil, causes 1972 program. An optional fourth argument @var{continue}, if non-@code{nil}, causes
1973 the IC to 1973 the IC to
1974 remain on the unsatisfied read operation if the program terminates due 1974 remain on the unsatisfied read operation if the program terminates due
1975 to exhaustion of the input buffer. Otherwise the IC is set to the end 1975 to exhaustion of the input buffer. Otherwise the IC is set to the end
1976 of the program. When the program is done, @var{status} is modified (by 1976 of the program. When the program is done, @var{status} is modified (by
1977 side-effect) to contain the ending values for the corresponding 1977 side-effect) to contain the ending values for the corresponding
1978 registers and IC. Returns the resulting string. 1978 registers and IC. Returns the resulting string.
1979 @end defun 1979 @end defun
1980 1980
1981 To call a CCL program from another CCL program, it must first be 1981 To call a CCL program from another CCL program, it must first be
1982 registered: 1982 registered:
1983 1983
1984 @defun register-ccl-program name ccl-program 1984 @defun register-ccl-program name ccl-program
1985 Register @var{name} for CCL program @var{program} in 1985 Register @var{name} for CCL program @var{ccl-program} in
1986 @code{ccl-program-table}. @var{program} should be the compiled form of 1986 @code{ccl-program-table}. @var{ccl-program} should be the compiled form of
1987 a CCL program, or nil. Return index number of the registered CCL 1987 a CCL program, or @code{nil}. Return index number of the registered CCL
1988 program. 1988 program.
1989 @end defun 1989 @end defun
1990 1990
1991 Information about the processor time used by the CCL interpreter can be 1991 Information about the processor time used by the CCL interpreter can be
1992 obtained using these functions: 1992 obtained using these functions:
2032 whether the character is in that category. 2032 whether the character is in that category.
2033 2033
2034 Special Lisp functions are provided that abstract this, so you do not 2034 Special Lisp functions are provided that abstract this, so you do not
2035 have to directly manipulate bit vectors. 2035 have to directly manipulate bit vectors.
2036 2036
2037 @defun category-table-p obj 2037 @defun category-table-p object
2038 This function returns @code{t} if @var{arg} is a category table. 2038 This function returns @code{t} if @var{object} is a category table.
2039 @end defun 2039 @end defun
2040 2040
2041 @defun category-table &optional buffer 2041 @defun category-table &optional buffer
2042 This function returns the current category table. This is the one 2042 This function returns the current category table. This is the one
2043 specified by the current buffer, or by @var{buffer} if it is 2043 specified by the current buffer, or by @var{buffer} if it is
2047 @defun standard-category-table 2047 @defun standard-category-table
2048 This function returns the standard category table. This is the one used 2048 This function returns the standard category table. This is the one used
2049 for new buffers. 2049 for new buffers.
2050 @end defun 2050 @end defun
2051 2051
2052 @defun copy-category-table &optional table 2052 @defun copy-category-table &optional category-table
2053 This function constructs a new category table and return it. It is a 2053 This function returns a new category table which is a copy of
2054 copy of the @var{table}, which defaults to the standard category table. 2054 @var{category-table}, which defaults to the standard category table.
2055 @end defun 2055 @end defun
2056 2056
2057 @defun set-category-table table &optional buffer 2057 @defun set-category-table category-table &optional buffer
2058 This function selects a new category table for @var{buffer}. One 2058 This function selects @var{category-table} as the new category table for
2059 argument, a category table. @var{buffer} defaults to the current buffer 2059 @var{buffer}. @var{buffer} defaults to the current buffer if omitted.
2060 if omitted. 2060 @end defun
2061 @end defun 2061
2062 2062 @defun category-designator-p object
2063 @defun category-designator-p obj 2063 This function returns @code{t} if @var{object} is a category designator (a
2064 This function returns @code{t} if @var{arg} is a category designator (a
2065 char in the range @samp{' '} to @samp{'~'}). 2064 char in the range @samp{' '} to @samp{'~'}).
2066 @end defun 2065 @end defun
2067 2066
2068 @defun category-table-value-p obj 2067 @defun category-table-value-p object
2069 This function returns @code{t} if @var{arg} is a category table value. 2068 This function returns @code{t} if @var{object} is a category table value.
2070 Valid values are @code{nil} or a bit vector of size 95. 2069 Valid values are @code{nil} or a bit vector of size 95.
2071 @end defun 2070 @end defun
2072 2071