summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2006-05-18 02:19:01 +0000
committerKenichi Handa <handa@m17n.org>2006-05-18 02:19:01 +0000
commit0c2660c849293d23296f758c4a50f6e40432cf2e (patch)
treea2edd54d8cbd47dc959345b0c748b778811f3b05 /src/coding.c
parentad598c8b58dd85c94b23918b55091e0ea7f027bc (diff)
downloademacs-0c2660c849293d23296f758c4a50f6e40432cf2e.tar.gz
(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.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c
index 155da568007..478e119c003 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -363,6 +363,7 @@ Lisp_Object Qno_conversion, Qundecided;
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 @@ setup_coding_system (coding_system, coding)
= 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 @@ setup_coding_system (coding_system, coding)
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 @@ syms_of_coding ()
Qvalid_codes = intern ("valid-codes");
staticpro (&Qvalid_codes);
+ Qascii_incompatible = intern ("ascii-incompatible");
+ staticpro (&Qascii_incompatible);
+
Qemacs_mule = intern ("emacs-mule");
staticpro (&Qemacs_mule);