changeset 70704:576f5c8ea6e4

(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.
author Kenichi Handa <handa@m17n.org>
date Thu, 18 May 2006 02:19:01 +0000
parents 85b353760b1c
children 73da2b5d5e9c
files src/coding.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);