# HG changeset patch # User Kenichi Handa # Date 1147918741 0 # Node ID 576f5c8ea6e496fe45101e95324d8020416f3346 # Parent 85b353760b1cc0b891f809210d93dd551baa2716 (Qascii_incompatible): New variable. (syms_of_coding): Setup Qascii_incompatible. (setup_coding_system): Be sure to initialize coding->common_flags. Check `ascii-incompatible' property of the coding system. diff -r 85b353760b1c -r 576f5c8ea6e4 src/coding.c --- a/src/coding.c Thu May 18 02:17:39 2006 +0000 +++ b/src/coding.c Thu May 18 02:19:01 2006 +0000 @@ -363,6 +363,7 @@ Lisp_Object Qcoding_system_history; Lisp_Object Qsafe_chars; Lisp_Object Qvalid_codes; +Lisp_Object Qascii_incompatible; extern Lisp_Object Qinsert_file_contents, Qwrite_region; Lisp_Object Qcall_process, Qcall_process_region; @@ -3625,7 +3626,10 @@ = CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; } else - coding->eol_type = CODING_EOL_LF; + { + coding->common_flags = 0; + coding->eol_type = CODING_EOL_LF; + } coding_type = XVECTOR (coding_spec)->contents[0]; /* Try short cut. */ @@ -3685,6 +3689,12 @@ if (!NILP (val)) coding->composing = COMPOSITION_NO; + /* If the coding system is ascii-incompatible, record it in + common_flags. */ + val = Fplist_get (plist, Qascii_incompatible); + if (! NILP (val)) + coding->common_flags |= CODING_ASCII_INCOMPATIBLE_MASK; + switch (XFASTINT (coding_type)) { case 0: @@ -7814,6 +7824,9 @@ Qvalid_codes = intern ("valid-codes"); staticpro (&Qvalid_codes); + Qascii_incompatible = intern ("ascii-incompatible"); + staticpro (&Qascii_incompatible); + Qemacs_mule = intern ("emacs-mule"); staticpro (&Qemacs_mule);