Commit graph

584 commits

Author SHA1 Message Date
Kenichi Handa
c006c0c8cc (detect_coding): Fix previous change.
(detect_coding_system): Likewise.
2008-06-05 11:35:10 +00:00
Kenichi Handa
c0e16b1436 (detect_coding): Fix handling of coding->head_ascii.
Be sure to call setup_coding_system when a proper coding system is
found.
(detect_coding_system): Fix handling of coding->head_ascii.
2008-06-04 07:53:59 +00:00
Kenichi Handa
a470d44380 (CODING_UTF_8_BOM): New macro.
(enum coding_category): Delete coding_category_utf_8, add
coding_category_utf_8_auto, coding_category_utf_8_nosig, and
coding_category_utf_8_sig.
(CATEGORY_MASK_UTF_8): Delete it.
(CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG)
(CATEGORY_MASK_UTF_8_SIG): New macros.
(CATEGORY_MASK_ANY): Delete CATEGORY_MASK_UTF_8, add
CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG, and
CATEGORY_MASK_UTF_8_SIG.
(CATEGORY_MASK_UTF_8): New macro.
(UTF_BOM, UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3): New macros.
(detect_coding_utf_8): Check BOM.
(decode_coding_utf_8, encode_coding_utf_8): Handle BOM.
(decode_coding_utf_16): Adjusted for the change of enum
utf_bom_type.
(encode_coding_utf_16): Likewise.
(setup_coding_system): Likewise.  Set CODING_UTF_8_BOM (coding).
(detect_coding, detect_coding_system): Handle utf-8-auto.
(Fdefine_coding_system_internal): Handle `bom' property for utf-8.
(syms_of_coding): Fix setting up of Vcoding_category_table.
2008-05-29 22:58:15 +00:00
Juanma Barranquero
446dcd7574 (Fdecode_coding_region, Fencode_coding_region, Fencode_coding_string):
(syms_of_coding) <coding-system-for-read, coding-system-for-write>:
<latin-extra-code-table>: Fix typos in docstrings.
(syms_of_coding) <coding-system-alist>: Doc fix.
(syms_of_coding) <translation-table-for-input>: Reflow docstring.
2008-05-28 09:11:59 +00:00
Kenichi Handa
319a394709 (encode_coding_raw_text): Fix previous change.
(encode_coding_object): When the dst_object is a buffer and is
different from src_object, move gap to PT.
2008-05-28 06:38:47 +00:00
Stefan Monnier
a0ed9b27c3 (encode_coding_raw_text): Fix last change. 2008-05-27 15:56:59 +00:00
Stefan Monnier
01d45367b2 (encode_coding_raw_text): Set coding->produced_char for all branches.
Compute it differently.
2008-05-27 15:49:49 +00:00
Juanma Barranquero
d4a1d55391 (Fcoding_system_p): Rename argument to match docstring.
(Funencodable_char_position, Fcheck_coding_systems_region,
Fdecode_coding_string, Fencode_coding_string): Fix typos in docstrings.
(Fdetect_coding_region, Fdetect_coding_string, Fencode_coding_region,
Ffind_operation_coding_system, Fset_coding_system_priority,
Fcoding_system_eol_type): Doc fixes.
2008-05-19 00:57:11 +00:00
Glenn Morris
9ec0b715e2 Switch to recommended form of GPLv3 permissions notice. 2008-05-14 07:50:26 +00:00
Kenichi Handa
c6b278e7cb (detect_coding_iso_2022): Ignore a coding category that
has no corresponding coding system.
2008-05-14 01:46:15 +00:00
Michael Albinus
3ed051d450 * coding.c (detect_coding_emacs_mule)
(Ffind_operation_coding_system): Fix typo.
2008-04-08 20:18:14 +00:00
Kenichi Handa
2f3cbb326b (CATEGORY_MASK_ANY): Add CATEGORY_MASK_UTF_16_AUTO.
(CATEGORY_MASK_UTF_16): Likewise.
(detect_coding_utf_16): Add heuristics to reject utf-16 for a
binary file.
(detect_coding): Add null-byte detection for a binary file.
(detect_coding_system): Likewise.
2008-04-03 12:31:27 +00:00
Stefan Monnier
bb555731e0 (decode_coding_object): Fix last change. 2008-03-27 20:26:59 +00:00
Stefan Monnier
0154725e48 (decode_coding_object): Revert part of last change. 2008-03-27 20:24:55 +00:00
Stefan Monnier
a1567c4544 (decode_coding_object): Fix last change. 2008-03-27 20:04:37 +00:00
Stefan Monnier
72d5003de7 (decode_coding_object): When not decoding into a buffer,
obey the coding system's preference of (uni|multi)byte.
2008-03-25 16:02:32 +00:00
Kenichi Handa
db274c7a06 (CHAR_STRING_ADVANCE_NO_UNIFY)
(STRING_CHAR_ADVANCE_NO_UNIFY): New macros.
(coding_alloc_by_making_gap): Fix the way to preserve data in the
gap.
(alloc_destination): Fix the 2nd arg to
coding_alloc_by_making_gap.
(encode_coding_utf_8): Use CHAR_STRING_ADVANCE_NO_UNIFY instead of
CHAR_STRING_ADVANCE.
(produce_chars): Fix for the case that the source and the
destination are the same buffer.  Use CHAR_STRING_ADVANCE_NO_UNIFY
instead of CHAR_STRING_ADVANCE.
(consume_chars): Use STRING_CHAR_ADVANCE_NO_UNIFY instead of
STRING_CHAR_ADVANCE.
2008-03-16 01:24:55 +00:00
Andreas Schwab
f4a3cc4433 (decode_coding_object): Inhibit gap shrinking while
decoding in place.
2008-03-03 22:29:12 +00:00
Andreas Schwab
14daee73e5 (decode_coding_big5, produce_chars): Fix typos in last
change.
2008-03-02 19:56:45 +00:00
Kenichi Handa
119852e72b (decode_coding_utf_8): When eol-type of CODING is
`dos', don't decode '\r' if that is the last in the source.
(decode_coding_utf_16, decode_coding_emacs_mule)
(decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
(decode_coding_raw_text, decode_coding_charset): Likewise.
(produce_chars): Don't decode EOL here.  Use EMACS_INT.
2008-03-02 08:05:14 +00:00
Glenn Morris
b3af4b2893 Fix comment typo. 2008-02-21 07:56:06 +00:00
Kenichi Handa
b3bfad50d9 (decode_coding_object, encode_coding_object): Preserve
Vdeactivate_mark.  Delete unnecessary call of Fcurrnet_buffer.
2008-02-14 12:24:15 +00:00
Stefan Monnier
13818c3078 * coding.c (coding_set_destination): Use BEG_BYTE rather than hardcoding 1.
(detect_coding_system):
* lisp.h (detect_coding_system, chars_in_text, multibyte_chars_in_text)
(string_char_to_byte, string_byte_to_char, insert_from_gap):
* insdel.c (insert_from_gap):
* fns.c (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
(string_char_to_byte, string_byte_to_char, string_make_multibyte)
(string_to_multibyte):
* character.c (chars_in_text, multibyte_chars_in_text):
* fileio.c (Finsert_file_contents): Use EMACS_INT for buffer positions.
2008-02-12 21:35:15 +00:00
Jan Djärv
f937a7db33 (DECODE_EMACS_MULE_COMPOSITION_CHAR): Use "do...while (0)". 2008-02-07 12:55:55 +00:00
Kenichi Handa
69b8522de8 (decode_eol): Pay attention to coding->dst_multibyte. 2008-02-05 04:12:52 +00:00
Miles Bader
d235ca2ff8 Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
2008-01-30 07:57:28 +00:00
Kenichi Handa
64cedb0c2b (decode_coding_object): Adjuste marker positions after
conversion.
(encode_coding_object): Likewise.
2008-01-18 07:08:52 +00:00
Glenn Morris
fdecf90749 (select-safe-coding-system-function): Doc fix. 2008-01-16 04:12:22 +00:00
Kenichi Handa
81cd7687ab (detect_coding_mask): Fix previous change. 2008-01-11 11:30:25 +00:00
Kenichi Handa
36a04480a5 (detect_coding_iso2022): New arg latin_extra_code_state. Allow Latin
extra codes only when *latin_extra_code_state is nonzero.
(detect_coding_mask): If there is a NULL byte, detect the encoding as
UTF-16 or binary.  If there is a Latin extra code, detect the encoding
as ISO-2022 only when no other proper encoding is found.
2008-01-09 06:05:23 +00:00
Miles Bader
430d2ee291 Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-312
2008-01-09 01:21:15 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
8cabe764e9 Add 2008 to copyright years. 2008-01-08 04:37:27 +00:00
Stefan Monnier
bae72c12b5 * coding.c (detect_coding, Fupdate_coding_systems_internal):
* fns.c (Fmd5): Use find_symbol_value rather than SYMBOL_VALUE
Since we do not want to see internal Lisp_*fwd objects here.
2007-11-19 07:40:51 +00:00
Kenichi Handa
2354b80b63 (Fdecode_coding_region): Fix typo in docstring. 2007-11-06 13:32:57 +00:00
Miles Bader
9c8020a8df Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 890-898)

   - Update from CVS
   - Merge from emacs--rel--22

 * emacs--rel--22  (patch 122-128)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 257-258)

   - Merge from emacs--rel--22
   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
2007-10-19 00:00:21 +00:00
Glenn Morris
c7183fb83f (Qcompletion_ignore_case): New external Lisp_Object.
(Fread_coding_system): Ignore case of user input.
2007-10-17 01:29:58 +00:00
Glenn Morris
930f57b46e (Qcompletion_ignore_case): New external Lisp_Object.
(Fread_coding_system): Ignore case of user input.
2007-10-17 01:29:32 +00:00
Stefan Monnier
9beb8baa1f * xfns.c (Fx_create_frame, Fx_display_list):
* window.c (window_fixed_size_p, enlarge_window, shrink_window_lowest_first):
* macterm.c (init_font_name_table):
* macfns.c (Fx_create_frame, Fx_display_list):
* lread.c (close_load_descs):
* keyboard.c (read_char_x_menu_prompt):
* fns.c (Fmember, Fmemql, Fdelete, Fset_char_table_parent):
* coding.c (code_convert_region_unwind): Test the type of an object
rather than just !NILP before extracting data from it.
2007-10-16 16:28:39 +00:00
Miles Bader
985773c903 Fix up multi-tty merge
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-261
Creator:  Stefan Monnier <monnier@iro.umontreal.ca>
2007-10-12 21:06:27 +00:00
Miles Bader
c73bd236f7 Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 866-879)

   - Merge multi-tty branch
   - Update from CVS
   - Merge from emacs--rel--22

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
2007-10-11 16:24:58 +00:00
Michaël Cadilhac
ba1cbad789 (detect_eol_type, detect_eol_type_in_2_octet_form):
Fix a C warning regarding variable constness.
2007-09-19 10:02:43 +00:00
Miles Bader
9899d01a0c Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 824-838)

   - Update from CVS
   - Merge from emacs--rel--22
   - Remove lisp/erc/erc-nicklist.el
   - Update some .arch-inventory files
   - Fix void function definition error in cus-edit.el
   - Restore lisp/emacs-lisp/cl-loaddefs.el

 * emacs--rel--22  (patch 70-83)

   - Update from CVS
   - Remove lisp/erc/erc-nicklist.el
   - Update some .arch-inventory files
   - Indicate that emacs--devo--0--patch-834 does not need to be applied
   - Merge from gnus--rel--5.10
   - Restore lisp/emacs-lisp/cl-loaddefs.el

 * gnus--rel--5.10  (patch 239-241)

   - Merge from emacs--devo--0
   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-28
2007-07-31 05:50:45 +00:00
Miles Bader
e468b87f91 Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 824-831)

   - Update from CVS
   - Merge from emacs--rel--22

 * emacs--rel--22  (patch 70-74)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-238
2007-07-27 10:52:18 +00:00
Kenichi Handa
c66fb5a6db (detect_coding_iso_2022): Don't treat SI/SO codes as a
strong evidence of ISO-2022.
2007-07-26 11:24:02 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
1427aa658e Remove license from trivial file. 2007-07-25 07:49:39 +00:00
Miles Bader
492d9f3e3c Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 814-823)

   - Update from CVS
   - Merge from emacs--rel--22

 * emacs--rel--22  (patch 59-69)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 237-238)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-26
2007-07-24 01:25:28 +00:00
Miles Bader
d918f936d5 Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 816-823)

   - Update from CVS
   - Merge from emacs--rel--22

 * emacs--rel--22  (patch 59-69)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 237-238)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-235
2007-07-24 01:23:55 +00:00
Juanma Barranquero
9ce1a9c4c5 (Ffind_operation_coding_system): Doc fix.
Reported by Johan Bockgård.
2007-07-18 11:47:54 +00:00