Kenichi Handa [Thu, 26 Jun 2003 00:27:04 +0000 (00:27 +0000)]
(choose_write_coding_system): Return a decided coding system.
(Fwrite_region): Set Vlast_coding_system_used to the return value
of choose_write_coding_system.
Kenichi Handa [Sun, 22 Jun 2003 23:27:03 +0000 (23:27 +0000)]
(utf-16-be): Make it an alias of utf-16be-with-signature.
(utf-16-le): Make it an alias of utf-16be-with-signature.
(utf-16-be-with-signature, utf-16-le-with-signature): Remove these
coding system aliases.
Kenichi Handa [Fri, 6 Jun 2003 03:59:02 +0000 (03:59 +0000)]
(universal-coding-system-argument):
Check the coding system type `undecided', not `t'.
(sort-coding-systems): Fix for iso-2022 coding systems.
(find-multibyte-characters): Fix for eight-bit chars.
(set-language-environment): Set charset priorities according to
the charsets supported by the coding systems of higher priorities.
Kenichi Handa [Fri, 6 Jun 2003 02:13:40 +0000 (02:13 +0000)]
* coding.c (QCcategory): New variable.
(syms_of_coding): Defsym it. Set all elements of
Vcoding_category_table and their symbol values.
(Fset_coding_system_priority): Doc fix. Update symbol qvalues of
coding-category-XXX, and coding-category-list.
(Fdefine_coding_system_internal): Add category in the plist.
Kenichi Handa [Thu, 5 Jun 2003 23:21:22 +0000 (23:21 +0000)]
(Fset_coding_system_priority): Doc fix. Update values
of codng-category-XXX, and coding-category-list.
(syms_of_coding): Set all elements of Vcoding_category_table and
their symbol values.
Kenichi Handa [Thu, 5 Jun 2003 12:34:31 +0000 (12:34 +0000)]
(decode_coding_iso_2022): Fix handling of invalid
bytes.
(raw_text_coding_system): Check NILP (coding_system).
(coding_inherit_eol_type): Check NILP (coding_system) and
NILP (parent).
(consume_chars): Fix for the case of raw-text.
Kenichi Handa [Fri, 30 May 2003 07:00:29 +0000 (07:00 +0000)]
(GET_CHAR_BEFORE_2): Check multibyte, not
target_multibyte. Even in a unibyte case, return a converted
multibyte char.
(GET_CHAR_AFTER): New macro.
(PATFETCH): Translate via multibyte char.
(HANDLE_UNIBYTE_RANGE): Delete this macro.
(SETUP_MULTIBYTE_RANGE): New macro.
(regex_compile): Setup compiled code so that its multibyteness
matches that of a target. Fix the handling of "[X-YZ]" using
SETUP_MULTIBYTE_RANGE.
(analyse_first) <charset>: For filling fastmap for all multibyte
characters, don't check by BASE_LEADING_CODE_P.
(re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
the same as RE_MULTIBYTE_P (bufp) now.
(mutually_exclusive_p): Check by (! multibyte ||
IS_REAL_ASCII (c)).
(TARGET_CHAR_AND_LENGTH): Delete this macro.
(TRANSLATE_VIA_MULTIBYTE): New macro.
(re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
It is the same as RE_MULTIBYTE_P (bufp) now.
<exactn>: Translate via multibyte.
<anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
translate it.
<charset, charset_not>: Fetch a character by
RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
<duplicate>: Call bcmp_translate with the last arg `multibyte'.
<wordbound, notwordbound, wordbeg, wordend, syntaxspec,
notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
by GET_CHAR_AFTER.
(bcmp_translate): Likewise.
Kenichi Handa [Fri, 30 May 2003 06:02:00 +0000 (06:02 +0000)]
(ctext-non-standard-designations-alist):
Exclude entries for iso8859-1[03456]. Fix docstring.
(ctext-pre-write-conversion): Make it work for the case that FROM
is a string. Don't do unnecessary save-restriction and
narrow-to-region.
Kenichi Handa [Thu, 29 May 2003 13:17:04 +0000 (13:17 +0000)]
(setup_coding_system): If coding has
post-read-conversion or pre-write-conversion, set
CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
respectively.
(decode_coding_gap): Run post-read-conversion if any.
Kenichi Handa [Wed, 28 May 2003 11:41:17 +0000 (11:41 +0000)]
(ctext-non-standard-encodings-alist):
Renamed from non-standard-icccm-encodings-alist.
(ctext-non-standard-encodings-regexp): New variable
(ctext-post-read-conversion): Full rewrite.
(ctext-non-standard-designations-alist): Renamed from
non-standard-designations-alist.
(ctext-pre-write-conversion): Full rewrite.
(define-coding-system): Doc fix (escape '"' by '\').
Kenichi Handa [Wed, 28 May 2003 11:35:50 +0000 (11:35 +0000)]
(kill_workbuf_unwind): New function.
(Finsert_file_contents): On replacing, call
make_conversion_work_buffer with correct args, and call
record_unwind_protect with the first arg kill_workbuf_unwind.
Dave Love [Fri, 23 May 2003 23:31:25 +0000 (23:31 +0000)]
(utf-16le, utf-16be-16be)
(utf-16le-with-signature, utf-16be-with-signature, utf-16):
Define :mime-text-unsuitable. `utf-16{b,l}e...' renamed from
`-16-{b,l}e-' and aliases defined for the old names.
Kenichi Handa [Tue, 20 May 2003 13:04:49 +0000 (13:04 +0000)]
(BASE_FONTSET_P): Check FONTSET_BASE, not
FONTSET_NAME.
(fontset_add): Fix for the case that TO is less than TO1.
(Ffontset_info): Don't use fallback fontset on checking the
default fontset.
(dump_fontset): New function for debugging.
Kenichi Handa [Tue, 6 May 2003 23:24:36 +0000 (23:24 +0000)]
(map_sub_char_table): New argument DEFAULT_VAL.
(map_char_table): Don't inherit the value from the parent on
initializing VAL. Adjusted for the above change.
Kenichi Handa [Tue, 6 May 2003 12:28:11 +0000 (12:28 +0000)]
(Qsignature, Qendian): Delete these variables.
(syms_of_coding): Don't initialize them.
(CATEGORY_MASK_UTF_16_AUTO): New macro.
(detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
detect_info->found.
(decode_coding_utf_16): Don't detect BOM here.
(encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
is NOT utf_16_without_bom.
(setup_coding_system): For a coding system of type utf-16, check
if the attribute :endian is Qbig or not (not nil or not), and set
CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
(detect_coding): If coding type is utf-16 and BOM detection is
required, detect it.
(Fdefine_coding_system_internal): For a coding system of type
utf-16, check if the attribute :endian is Qbig or not (not nil or
not).
Kenichi Handa [Tue, 6 May 2003 08:16:37 +0000 (08:16 +0000)]
(coding_set_source): Fix for the case that the current
buffer is different from coding->src_object.
(decode_coding_object): Don't use the conversion work buffer if
DST_OBJECT is a buffer.
(Vface_font_rescale_alist): Renamed from
Vface_resizing_fonts.
(struct font_name): Rename member resizing_ratio to rescale_ratio.
(font_rescale_ratio): Renamed from font_resizing_ratio.
(split_font_name): Set font->rescale_ratio.
(better_font_p): Pay attention to font->rescale_ratio.
(build_scalable_font_name): Likewise. Change RESX, and RESY
fields.
(syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
variable.
Kenichi Handa [Fri, 28 Mar 2003 04:06:53 +0000 (04:06 +0000)]
(utf-16-le): Renamed from utf-16-le-nosig.
(utf-16-be): Renamed from utf-16-be-nosig.
(utf-16-le-with-sig): Renamed from utf-16-le.
(utf-16-be-with-sig): Renamed from utf-16-be.
(utf-16): Set :bom to (utf-16-le-with-sig . utf-16-be-with-sig).
Kenichi Handa [Thu, 30 Jan 2003 02:23:40 +0000 (02:23 +0000)]
(decode_coding_ccl, encode_coding_ccl): Call ccl_driver
with the last arg charset_list acquired from coding.
(Fdefine_coding_system_internal): For ccl-based coding system, fix
the attribute coding_attr_ccl_valids.
Kenichi Handa [Thu, 30 Jan 2003 02:19:06 +0000 (02:19 +0000)]
(CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
(ccl_driver): New arg CHARSET_LIST. Use the above macros instead
of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
(Fccl_execute): Call ccl_driver with the last arg Qnil.
(Fccl_execute_on_string): Likewise.