Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(Vccl_translation_table_vector, Qccl_program,
Qccl_translation_table, Qccl_translation_table_id): New variables.
append new symbols. Qccl_translation_table and
Qccl_translation_table_id.
(CCL_Call): Fix the comment.
(CCL_ReadMultibyteCharacter, CCL_WriteMultibyteCharacter,
CCL_UnifyCharacter, CCL_UnifyCharacterConstTbl,
CCL_IterateMultipleMap, CCL_TranslateMultipleMap): New macros for
CCL Commands.
(EXCMD): New macro.
(ccl_driver): New case lable `CCL_Extention'.
(setup_ccl_program): Initialize the member `private_state' of CCL.
(Fregister_ccl_program): Delete unused variable IDX.
(Fregister_ccl_translation_table): New function.
(syms_of_ccl): Intern and staticpro Qccl_program,
Qccl_translation_table, and Qccl_translation_table_id. Declare
`ccl-translation-table-vector' as a Lisp variable. Declare
register-ccl-translation-table as a Lisp function.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(min_composite_char): New variable.
(Vcharacter_unification_table_vector): New variable.
(syms_of_charset): Declare it as a Lisp symbol. Declare a Lisp
variable min-composite-char.
(unify_char): Delete unnecessary codes.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(BCOPY_SHORT): New macro.
(MAX_CHAR_COMPOSITION): New macro.
(CHAR_CHARSET): Check more strictly.
(CODING_FLAG_ISO_DESIGNATION): New macro.
(Vcharacter_unification_table_vector): Extern it.
(UNIFICATION_ID_TABLE): New macro.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
Vselect_safe_coding_system_function): New variable.
(coding_category_table): This variable deleted.
(Vcoding_category_table): New variable.
(coding_category_name): Add "coding-category-iso-7-tight".
(detect_coding_iso2022): Check the mask
CODING_FLAG_ISO_DESIGNATION in CODING->FLAGS. Check a new coding
category coding-category-iso-7-tight.
(DECODE_DESIGNATION): Decode only such designations that CODING
can handle.
(check_composing_code): New function.
(decode_coding_iso2022): Decode only such characters that CODING
can handle.
(encode_coding_iso2022): Before and after encoding composite
characters, reset designation and invocation status.
(detect_coding_sjis): Delete unnecessary check.
(detect_coding_big5): Likewise.
(encode_designation_at_bol): Check the validity of requested
designation register.
(setup_coding_system): Set requested designation registers for
non-supported charsets to
CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION. Set mask
CODING_FLAG_ISO_DESIGNATION in CODING->FLAGS. Code tuned for
no-conversion and undecided.
(detect_coding): Adjusted for the new variable
Vcoding_category_table.
(syms_of_coding): Initialize Vcoding_category_table and staticpro
it. Register select-safe-coding-system as a Lisp variable.
(DECODE_CHARACTER_ASCII): Update coding->produced_char;
(DECODE_CHARACTER_DIMENSION1): Likewise.
(Qraw_text, Qcoding_category): New variables.
(syms_of_coding): Intern and staticpro them.
(coding_system_table): New variable.
(CHARSET_OK, SHIFT_OUT_OK): New macros.
(detect_coding_iso2022): Detection algorithm improved.
(decode_coding_iso2022): Arg CONSUMED deleted, and the meaning of
return value changed. Update members produced, produced_char,
consumed, consumed_char of the struct *coding. Pay attention to
CODING_MODE_INHIBIT_INCONSISTENT_EOL.
(encode_coding_iso2022): Likewise.
(decode_coding_sjis_big5, encode_coding_sjis_big5): Likewise.
(decode_eol, encode_eol): Likewise.
(ENCODE_ISO_CHARACTER): Update coding->consumed_char.
(DECODE_SJIS_BIG5_CHARACTER): Update coding->produced_char.
(ENCODE_SJIS_BIG5_CHARACTER): Update coding->consumed_char.
(detect_coding(detect_coding(detect_ITIES and SKIP.
(detect_coding): Adjusted for the change of detect_coding_mask.
Update coding->heading_ascii.
(detect_eol_type): New arg SKIP.
(detect_eol): Adjusted for the change of detect_eol_type.
(ccl_codign_driver): New function.
(decode_coding): Arg CONSUMED deleted, and the meaning of return
value changed. Update members produced, produced_char, consumed,
consumed_char of the struct *coding.
(encode_coding): Likewise.
(shrink_decoding_region, shrink_encoding_region): New function.
(code_convert_region, code_convert_string): Completely rewritten.
(detect_coding_sy(detect_coding_sy(detect_coding_sy(detect_coding_sy(detect_codiT.
(Fdetect_coding_string): New function.
(Fdecode_coding_region, Fencode_coding_region): Adjusted for the
change of code_convert_region.
(Fdecode_coding_string, Fencode_coding_string): Adjusted for the
change of code_convert_string.
(Fupdate_iso_coding_systems): New function.
(init_coding_once): Initialize coding_system_table.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(CODING_FLAG_ISO_DESIGNATION): New macro.
(struct iso2022_spec): New member.
last_invalid_designation_register.
(struct coding_system): New member inhibit_inconsistent_eol_type.
(CODING_CATEGORY_IDX_ISO_7_TIGHT,
CODING_CATEGORY_MASK_ISO_7_TIGHT): New macros.
(CODING_CATEGORY_MASK_ANY): Include
CODING_CATEGORY_MASK_ISO_7_TIGHT.
(coding_category_table, coding_category_name): Extern deleted.
(Vselect_safe_coding_system_function): Extern it.
(CODING_FINISH_XXX): New macros.
(CODING_MODE_XXX): New macros.
(struct coding_system): New member mode, category_idx,
heading_ascii. Deleted members last_block, direction, selective,
carryover, carryover_size.
(CODING_MAY_REQUIRE_DECODING): New macro.
(CODING_CATEGORY_MASK_ISO_7BIT, CODING_CATEGORY_MASK_ISO_8BIT,
CODING_CATEGORY_MASK_ISO_SHIFT, CODING_CATEGORY_MASK_ISO): New
macros.
(Qraw_text): Extern it.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(Fstart_process): Use raw-text instead of emacs-mule
if enable-multibyte-characters is nil. Initialize members
decoding_carryover and encoding_carryover of PROC.
(create_process): Adjusted for the change of encode_coding.
(Fopen_network_stream): Initialize members decoding_carryover and
encoding_carryover of PROC.
(read_process_output): Adjusted for the change of decode_coding.
(send_process): Adjusted for the change of encode_coding.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(Finsert_file_contents): Even if
enable-multibyte-characters is nil, we must check `coding:' tag
and `file-coding-system-alist' to handle eol-conversion.
(Finsert_file_contents): Adjusted for the change of
struct coding_system and function decode_coding. For normail file
reading, use code_convert_region.
(Fwrite_region): Adjusted for the change of struct coding_system.
(e_write): Adjusted for the change of encode_coding.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(encode_terminal_code): Adjusted for the change of
encode_coding.
(write_glyphs): Likewise. Adjusted for the change of struct
coding_system.
(insert_glyphs): Likewise.
Kenichi Handa [Thu, 22 Jan 1998 01:26:45 +0000 (01:26 +0000)]
(selection_data_to_lisp_data): Adjusted for the change
of decode_coding.
(lisp_data_to_selection_data): Adjusted for the change of
encode_coding.
(syms_of_xselect): Initialize clipboard-coding-system to
compound-text.
(internal_self_insert, Fself_insert_command):
Use unibyte_char_to_multibyte.
(nonascii_insert_offset): Variable moved to charset.c.
(syms_of_cmds): Don't initialize nonascii_insert_offset.
(current_column_1): Eliminate argument POS; use PT and PT_BYTE.
When doing FETCH_BYTE, use scan_byte.
(current_column): Check whether buffer really has multibyte chars,
not whether they are enabled.
Karl Heuer [Sun, 18 Jan 1998 04:53:32 +0000 (04:53 +0000)]
(compile_pattern_1): If representation of STRING
does not fit MULTIBYTE, convert its contents.
(fast_c_string_match_ignore_case): Pass 0 to compile_pattern
as MULTIBYTE.
(search_buffer): If representation of STRING
does not fit MULTIBYTE, convert its contents.
Karl Heuer [Sun, 18 Jan 1998 04:49:11 +0000 (04:49 +0000)]
(read1): Escape codes can force multibyte or single-byte.
Otherwise buffer_defaults->enable_multibyte_characters decides.
Only set force_singlebyte when a \-sequence is in the relevant
range.
(read_escape): New arg STRINGP. `\ ' is ignored only when STRINGP
(normally, when reading a string). Calls changed.
Karl Heuer [Sun, 18 Jan 1998 04:37:08 +0000 (04:37 +0000)]
(concat): Move the test for all nil in `append'
back to the right place.
Always compute result_len_byte as for a multibyte string. Then,
if the result will be single-byte, don't use that computation.
When converting single-byte to multibyte, don't use copy_text.
Do use copy_text between single-byte string and multibyte string.
(Fstring_make_multibyte, Fstring_make_unibyte): New functions.
(syms_of_fns): defsubr them.
(string_char_to_byte): Count from the beginning or the end,
whichever is closer. Keep a cache of recent values.
(string_byte_to_char): Likewise.
(Fstring_lessp): Compare the strings char by char.
Karl Heuer [Sun, 18 Jan 1998 03:19:14 +0000 (03:19 +0000)]
(STRING_BASE_SIZE): New macro.
(STRING_FULLSIZE): Use STRING_BASE_SIZE instead of the whole
size of struct Lisp_String.
(make_pure_string): Use STRING_FULLSIZE.
(ange-ftp-inodes-hashtable): New variable.
(ange-ftp-next-inode-number): New variable.
(ange-ftp-file-attributes): Assign each file a unique "inode number".
(struct gl_state_s): New field `object'.
(SETUP_SYNTAX_TABLE_FOR_OBJECT): Set it.
Handle non-current buffer properly. Args renamed to all caps.
(SETUP_SYNTAX_TABLE): Set `object'. Args renamed to all caps.
(UPDATE_SYNTAX_TABLE): Use gl_state.object.
(UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD): Likewise.
(SETUP_SYNTAX_TABLE_FOR_OBJECT): Add gl_state.offset
when using the arg FROM. Use BYTE_TO_CHAR.
(message_dolog, message2): New arg MULTIBYTE.
Callers changed.
(message1, message1_nolog): String must be ASCII-only.
(message2, message2_nolog): Now static.
(x_consider_frame_title): Use size_byte.
(display_text_line): Likewise.
And scan Voverlay_arrow_string by bytes and chars.
(display_menu_bar): Call display_string with a byte size.
(display_mode_line): Call display_string with a byte size.
(describe_vector): Unconditionally handle multibyte chars.
(describe_vector): Pass new args to insert_from_string.
(Ftext_char_description): Use make_multibyte_string.
(Fkey_binding): Scan PREFIX a char at a time.
(Fkey_description): Scan KEYS by chars.