Mercurial > emacs
changeset 22186:fc4aaf1b1772
Change term "character translation table" to "translation table".
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 22 May 1998 09:45:34 +0000 |
parents | 80a2aa51a6e1 |
children | 9509e86a7be5 |
files | lisp/international/ccl.el lisp/international/mule-conf.el lisp/international/mule-util.el lisp/international/mule.el src/ccl.c src/coding.c src/coding.h |
diffstat | 7 files changed, 85 insertions(+), 96 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/ccl.el Fri May 22 09:44:27 1998 +0000 +++ b/lisp/international/ccl.el Fri May 22 09:45:34 1998 +0000 @@ -882,9 +882,8 @@ (ccl-check-register rrr cmd) (ccl-check-register RRR cmd) (cond ((symbolp Rrr) - (if (not (get Rrr 'character-translation-table)) - (error "CCL: Invalid character translation table %s in %s" - Rrr cmd)) + (if (not (get Rrr 'translation-table)) + (error "CCL: Invalid translation table %s in %s" Rrr cmd)) (ccl-embed-extended-command 'translate-character-const-tbl rrr RRR 0) (ccl-embed-data Rrr)) @@ -1241,11 +1240,11 @@ (insert (format "write-multibyte-character r%d r%d\n" RRR rrr))) (defun ccl-dump-translate-character (rrr RRR Rrr) - (insert (format "character translation table(r%d) r%d r%d\n" Rrr RRR rrr))) + (insert (format "translation table(r%d) r%d r%d\n" Rrr RRR rrr))) (defun ccl-dump-translate-character-const-tbl (rrr RRR Rrr) (let ((tbl (ccl-get-next-code))) - (insert (format "character translation table(%d) r%d r%d\n" tbl RRR rrr)))) + (insert (format "translation table(%d) r%d r%d\n" tbl RRR rrr)))) (defun ccl-dump-iterate-multiple-map (rrr RRR Rrr) (let ((notbl (ccl-get-next-code))
--- a/lisp/international/mule-conf.el Fri May 22 09:44:27 1998 +0000 +++ b/lisp/international/mule-conf.el Fri May 22 09:45:34 1998 +0000 @@ -197,16 +197,16 @@ ;; These are tables for translating characters on decoding and ;; encoding. -(define-character-translation-table +(define-translation-table 'oldjis-newjis-jisroman-ascii (list (cons (make-char 'japanese-jisx0208-1978) (make-char 'japanese-jisx0208)) (cons (make-char 'latin-jisx0201) (make-char 'ascii)))) -(setq standard-character-translation-table-for-decode - (get 'oldjis-newjis-jisroman-ascii 'character-translation-table)) +(setq standard-translation-table-for-decode + (get 'oldjis-newjis-jisroman-ascii 'translation-table)) -(setq standard-character-translation-table-for-encode nil) +(setq standard-translation-table-for-encode nil) ;;; Make fundamental coding systems.
--- a/lisp/international/mule-util.el Fri May 22 09:44:27 1998 +0000 +++ b/lisp/international/mule-util.el Fri May 22 09:45:34 1998 +0000 @@ -233,12 +233,12 @@ ;;;###autoload (defun coding-system-translation-table-for-decode (coding-system) "Return the value of CODING-SYSTEM's translation-table-for-decode property." - (coding-system-get coding-system 'character-translation-table-for-decode)) + (coding-system-get coding-system 'translation-table-for-decode)) ;;;###autoload (defun coding-system-translation-table-for-encode (coding-system) "Return the value of CODING-SYSTEM's translation-table-for-encode property." - (coding-system-get coding-system 'character-translation-table-for-encode)) + (coding-system-get coding-system 'translation-table-for-encode)) (defun coding-system-lessp (x y) (cond ((eq x 'no-conversion) t)
--- a/lisp/international/mule.el Fri May 22 09:44:27 1998 +0000 +++ b/lisp/international/mule.el Fri May 22 09:45:34 1998 +0000 @@ -328,16 +328,15 @@ ;; in `write-region-annotate-functions', i.e. FROM and TO specifying ;; region of a text. ;; -;; o character-translation-table-for-decode +;; o translation-table-for-decode ;; -;; The value is a character translation table to be applied on -;; decoding. See the function `make-translation-table' for the format -;; of translation table. +;; The value is a translation table to be applied on decoding. See +;; the function `make-translation-table' for the format of translation +;; table. ;; -;; o character-translation-table-for-encode +;; o translation-table-for-encode ;; -;; The value is a character translation table to be applied on -;; encoding. +;; The value is a translation table to be applied on encoding. ;; ;; o safe-charsets ;; @@ -987,7 +986,7 @@ network-coding-system-alist))))))) (defun make-translation-table (&rest args) - "Make a character translation table (char table) from arguments. + "Make a translation table (char table) from arguments. Each argument is a list of the form (FROM . TO), where FROM is a character to be translated to TO. @@ -996,7 +995,7 @@ oridinal character. If FROM and TO are both generic characters, all characters belonging to FROM are translated to characters belonging to TO without changing their position code(s)." - (let ((table (make-char-table 'character-translation-table)) + (let ((table (make-char-table 'translation-table)) revlist) (while args (let ((elts (car args))) @@ -1045,33 +1044,32 @@ ;; Return TABLE just created. table)) -(defun define-character-translation-table (symbol &rest args) - "Define SYMBOL as a name of character translation table makde by ARGS. +(defun define-translation-table (symbol &rest args) + "Define SYMBOL as a name of translation table makde by ARGS. See the documentation of the function `make-translation-table' for the meaning of ARGS. -This function sets properties character-translation-table and -character-translation-table-id of SYMBOL to the created table itself -and identification number of the table respectively." +This function sets properties translation-table and +translation-table-id of SYMBOL to the created table itself and +identification number of the table respectively." (let ((table (apply 'make-translation-table args)) - (len (length character-translation-table-vector)) + (len (length translation-table-vector)) (id 0) (done nil)) - (put symbol 'character-translation-table table) + (put symbol 'translation-table table) (while (not done) (if (>= id len) - (setq character-translation-table-vector - (vconcat character-translation-table-vector - (make-vector len nil)))) - (let ((slot (aref character-translation-table-vector id))) + (setq translation-table-vector + (vconcat translation-table-vector (make-vector len nil)))) + (let ((slot (aref translation-table-vector id))) (if (or (not slot) (eq (car slot) symbol)) (progn - (aset character-translation-table-vector id (cons symbol table)) + (aset translation-table-vector id (cons symbol table)) (setq done t)))) (setq id (1+ id))) - (put symbol 'character-translation-table-id id) + (put symbol 'translation-table-id id) id)) ;;; Initialize some variables.
--- a/src/ccl.c Fri May 22 09:44:27 1998 +0000 +++ b/src/ccl.c Fri May 22 09:45:34 1998 +0000 @@ -442,8 +442,7 @@ 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ /* Translate a character whose code point is reg[rrr] and the charset - ID is reg[RRR] by a character translation table whose ID is - reg[Rrr]. + ID is reg[RRR] by a translation table whose ID is reg[Rrr]. A translated character is set in reg[rrr] (code point) and reg[RRR] (charset ID). */ @@ -452,8 +451,7 @@ 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ /* Translate a character whose code point is reg[rrr] and the charset - ID is reg[RRR] by a character translation table whose ID is - ARGUMENT. + ID is reg[RRR] by a translation table whose ID is ARGUMENT. A translated character is set in reg[rrr] (code point) and reg[RRR] (charset ID). */ @@ -1633,7 +1631,7 @@ if (EQ(result, ccl)) result = Fcopy_sequence (ccl); - prop = Fget (contents, Qcharacter_translation_table_id); + prop = Fget (contents, Qtranslation_table_id); if (NUMBERP (prop)) { XVECTOR (result)->contents[i] = prop;
--- a/src/coding.c Fri May 22 09:44:27 1998 +0000 +++ b/src/coding.c Fri May 22 09:45:34 1998 +0000 @@ -367,18 +367,18 @@ categories. */ struct coding_system *coding_system_table[CODING_CATEGORY_IDX_MAX]; -/* Flag to tell if we look up character translation table on character - code conversion. */ +/* Flag to tell if we look up translation table on character code + conversion. */ Lisp_Object Venable_character_translation; -/* Standard character translation table to look up on decoding (reading). */ -Lisp_Object Vstandard_character_translation_table_for_decode; -/* Standard character translation table to look up on encoding (writing). */ -Lisp_Object Vstandard_character_translation_table_for_encode; - -Lisp_Object Qcharacter_translation_table; -Lisp_Object Qcharacter_translation_table_id; -Lisp_Object Qcharacter_translation_table_for_decode; -Lisp_Object Qcharacter_translation_table_for_encode; +/* Standard translation table to look up on decoding (reading). */ +Lisp_Object Vstandard_translation_table_for_decode; +/* Standard translation table to look up on encoding (writing). */ +Lisp_Object Vstandard_translation_table_for_encode; + +Lisp_Object Qtranslation_table; +Lisp_Object Qtranslation_table_id; +Lisp_Object Qtranslation_table_for_decode; +Lisp_Object Qtranslation_table_for_encode; /* Alist of charsets vs revision number. */ Lisp_Object Vcharset_revision_alist; @@ -1010,11 +1010,11 @@ int charset0 = CODING_SPEC_ISO_PLANE_CHARSET (coding, 0); int charset1 = CODING_SPEC_ISO_PLANE_CHARSET (coding, 1); Lisp_Object translation_table - = coding->character_translation_table_for_decode; + = coding->translation_table_for_decode; int result = CODING_FINISH_NORMAL; if (!NILP (Venable_character_translation) && NILP (translation_table)) - translation_table = Vstandard_character_translation_table_for_decode; + translation_table = Vstandard_translation_table_for_decode; coding->produced_char = 0; coding->fake_multibyte = 0; @@ -1758,11 +1758,11 @@ head of loop. */ unsigned char *adjusted_dst_end = dst_end - 19; Lisp_Object translation_table - = coding->character_translation_table_for_encode; + = coding->translation_table_for_encode; int result = CODING_FINISH_NORMAL; if (!NILP (Venable_character_translation) && NILP (translation_table)) - translation_table = Vstandard_character_translation_table_for_encode; + translation_table = Vstandard_translation_table_for_encode; coding->consumed_char = 0; coding->fake_multibyte = 0; @@ -2175,11 +2175,11 @@ head of loop. */ unsigned char *adjusted_dst_end = dst_end - 3; Lisp_Object translation_table - = coding->character_translation_table_for_decode; + = coding->translation_table_for_decode; int result = CODING_FINISH_NORMAL; if (!NILP (Venable_character_translation) && NILP (translation_table)) - translation_table = Vstandard_character_translation_table_for_decode; + translation_table = Vstandard_translation_table_for_decode; coding->produced_char = 0; coding->fake_multibyte = 0; @@ -2364,11 +2364,11 @@ head of loop. */ unsigned char *adjusted_dst_end = dst_end - 1; Lisp_Object translation_table - = coding->character_translation_table_for_encode; + = coding->translation_table_for_encode; int result = CODING_FINISH_NORMAL; if (!NILP (Venable_character_translation) && NILP (translation_table)) - translation_table = Vstandard_character_translation_table_for_encode; + translation_table = Vstandard_translation_table_for_encode; coding->consumed_char = 0; coding->fake_multibyte = 0; @@ -2816,26 +2816,23 @@ /* Initialize remaining fields. */ coding->composing = 0; - coding->character_translation_table_for_decode = Qnil; - coding->character_translation_table_for_encode = Qnil; + coding->translation_table_for_decode = Qnil; + coding->translation_table_for_encode = Qnil; /* Get values of coding system properties: `post-read-conversion', `pre-write-conversion', - `character-translation-table-for-decode', - `character-translation-table-for-encode'. */ + `translation-table-for-decode', `translation-table-for-encode'. */ plist = XVECTOR (coding_spec)->contents[3]; coding->post_read_conversion = Fplist_get (plist, Qpost_read_conversion); coding->pre_write_conversion = Fplist_get (plist, Qpre_write_conversion); - val = Fplist_get (plist, Qcharacter_translation_table_for_decode); + val = Fplist_get (plist, Qtranslation_table_for_decode); if (SYMBOLP (val)) - val = Fget (val, Qcharacter_translation_table_for_decode); - coding->character_translation_table_for_decode - = CHAR_TABLE_P (val) ? val : Qnil; - val = Fplist_get (plist, Qcharacter_translation_table_for_encode); + val = Fget (val, Qtranslation_table_for_decode); + coding->translation_table_for_decode = CHAR_TABLE_P (val) ? val : Qnil; + val = Fplist_get (plist, Qtranslation_table_for_encode); if (SYMBOLP (val)) - val = Fget (val, Qcharacter_translation_table_for_encode); - coding->character_translation_table_for_encode - = CHAR_TABLE_P (val) ? val : Qnil; + val = Fget (val, Qtranslation_table_for_encode); + coding->translation_table_for_encode = CHAR_TABLE_P (val) ? val : Qnil; val = Fplist_get (plist, Qcoding_category); if (!NILP (val)) { @@ -5140,21 +5137,18 @@ } } - Qcharacter_translation_table = intern ("character-translation-table"); - staticpro (&Qcharacter_translation_table); - Fput (Qcharacter_translation_table, Qchar_table_extra_slots, - make_number (0)); - - Qcharacter_translation_table_id = intern ("character-translation-table-id"); - staticpro (&Qcharacter_translation_table_id); - - Qcharacter_translation_table_for_decode - = intern ("character-translation-table-for-decode"); - staticpro (&Qcharacter_translation_table_for_decode); - - Qcharacter_translation_table_for_encode - = intern ("character-translation-table-for-encode"); - staticpro (&Qcharacter_translation_table_for_encode); + Qtranslation_table = intern ("translation-table"); + staticpro (&Qtranslation_table); + Fput (Qtranslation_table, Qchar_table_extra_slots, make_number (0)); + + Qtranslation_table_id = intern ("translation-table-id"); + staticpro (&Qtranslation_table_id); + + Qtranslation_table_for_decode = intern ("translation-table-for-decode"); + staticpro (&Qtranslation_table_for_decode); + + Qtranslation_table_for_encode = intern ("translation-table-for-encode"); + staticpro (&Qtranslation_table_for_encode); Qsafe_charsets = intern ("safe-charsets"); staticpro (&Qsafe_charsets); @@ -5312,18 +5306,18 @@ eol_mnemonic_undecided = ':'; DEFVAR_LISP ("enable-character-translation", &Venable_character_translation, - "Non-nil means ISO 2022 encoder/decoder do character translation."); + "*Non-nil enables character translation while encoding and decoding."); Venable_character_translation = Qt; - DEFVAR_LISP ("standard-character-translation-table-for-decode", - &Vstandard_character_translation_table_for_decode, + DEFVAR_LISP ("standard-translation-table-for-decode", + &Vstandard_translation_table_for_decode, "Table for translating characters while decoding."); - Vstandard_character_translation_table_for_decode = Qnil; - - DEFVAR_LISP ("standard-character-translation-table-for-encode", - &Vstandard_character_translation_table_for_encode, + Vstandard_translation_table_for_decode = Qnil; + + DEFVAR_LISP ("standard-translation-table-for-encode", + &Vstandard_translation_table_for_encode, "Table for translationg characters while encoding."); - Vstandard_character_translation_table_for_encode = Qnil; + Vstandard_translation_table_for_encode = Qnil; DEFVAR_LISP ("charset-revision-table", &Vcharset_revision_alist, "Alist of charsets vs revision numbers.\n\
--- a/src/coding.h Fri May 22 09:44:27 1998 +0000 +++ b/src/coding.h Fri May 22 09:45:34 1998 +0000 @@ -375,8 +375,8 @@ Lisp_Object pre_write_conversion; /* Character translation tables to look up, or nil. */ - Lisp_Object character_translation_table_for_decode; - Lisp_Object character_translation_table_for_encode; + Lisp_Object translation_table_for_decode; + Lisp_Object translation_table_for_encode; }; #define CODING_REQUIRE_FLUSHING_MASK 1 @@ -530,8 +530,8 @@ extern Lisp_Object Qbuffer_file_coding_system; extern Lisp_Object Vcoding_category_list; -extern Lisp_Object Qcharacter_translation_table; -extern Lisp_Object Qcharacter_translation_table_id; +extern Lisp_Object Qtranslation_table; +extern Lisp_Object Qtranslation_table_id; /* Mnemonic character to indicate each type of end-of-line. */ extern int eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac;