;; 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
;;
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.
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)))
;; 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.
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;
+/* 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 Qcharacter_translation_table;
-Lisp_Object Qcharacter_translation_table_id;
-Lisp_Object Qcharacter_translation_table_for_decode;
-Lisp_Object Qcharacter_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;
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;
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;
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;
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;
/* 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))
{
}
}
- Qcharacter_translation_table = intern ("character-translation-table");
- staticpro (&Qcharacter_translation_table);
- Fput (Qcharacter_translation_table, Qchar_table_extra_slots,
- make_number (0));
+ Qtranslation_table = intern ("translation-table");
+ staticpro (&Qtranslation_table);
+ Fput (Qtranslation_table, Qchar_table_extra_slots, make_number (0));
- Qcharacter_translation_table_id = intern ("character-translation-table-id");
- staticpro (&Qcharacter_translation_table_id);
+ Qtranslation_table_id = intern ("translation-table-id");
+ staticpro (&Qtranslation_table_id);
- Qcharacter_translation_table_for_decode
- = intern ("character-translation-table-for-decode");
- staticpro (&Qcharacter_translation_table_for_decode);
+ Qtranslation_table_for_decode = intern ("translation-table-for-decode");
+ staticpro (&Qtranslation_table_for_decode);
- Qcharacter_translation_table_for_encode
- = intern ("character-translation-table-for-encode");
- staticpro (&Qcharacter_translation_table_for_encode);
+ Qtranslation_table_for_encode = intern ("translation-table-for-encode");
+ staticpro (&Qtranslation_table_for_encode);
Qsafe_charsets = intern ("safe-charsets");
staticpro (&Qsafe_charsets);
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;
+ Vstandard_translation_table_for_decode = Qnil;
- DEFVAR_LISP ("standard-character-translation-table-for-encode",
- &Vstandard_character_translation_table_for_encode,
+ 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\