aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2006-08-21 12:48:22 +0000
committerKenichi Handa2006-08-21 12:48:22 +0000
commit4a015c451a11c67ae830d2107c8b77052cb2d158 (patch)
tree474ed1a2573a5e38cae4086684ec67746d78ea2a /src
parent066f434419f9d74740e1d38f59d2168a54526c64 (diff)
downloademacs-4a015c451a11c67ae830d2107c8b77052cb2d158.tar.gz
emacs-4a015c451a11c67ae830d2107c8b77052cb2d158.zip
(setup_coding_system): Fix setting of
coding->common_flags based on eol_type. (coding_inherit_eol_type): If PARENT is not nil, be sure to inherit from it.
Diffstat (limited to 'src')
-rw-r--r--src/coding.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/coding.c b/src/coding.c
index 9ba96981c7f..98b40a38062 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -4963,8 +4963,14 @@ setup_coding_system (coding_system, coding)
4963 4963
4964 coding->mode = 0; 4964 coding->mode = 0;
4965 coding->head_ascii = -1; 4965 coding->head_ascii = -1;
4966 coding->common_flags 4966 if (VECTORP (eol_type))
4967 = (VECTORP (eol_type) ? CODING_REQUIRE_DETECTION_MASK : 0); 4967 coding->common_flags = (CODING_REQUIRE_DECODING_MASK
4968 | CODING_REQUIRE_DETECTION_MASK);
4969 else if (! EQ (eol_type, Qunix))
4970 coding->common_flags = (CODING_REQUIRE_DECODING_MASK
4971 | CODING_REQUIRE_ENCODING_MASK);
4972 else
4973 coding->common_flags = 0;
4968 if (! NILP (CODING_ATTR_POST_READ (attrs))) 4974 if (! NILP (CODING_ATTR_POST_READ (attrs)))
4969 coding->common_flags |= CODING_REQUIRE_DECODING_MASK; 4975 coding->common_flags |= CODING_REQUIRE_DECODING_MASK;
4970 if (! NILP (CODING_ATTR_PRE_WRITE (attrs))) 4976 if (! NILP (CODING_ATTR_PRE_WRITE (attrs)))
@@ -5202,8 +5208,7 @@ coding_inherit_eol_type (coding_system, parent)
5202 { 5208 {
5203 Lisp_Object parent_spec; 5209 Lisp_Object parent_spec;
5204 5210
5205 parent_spec 5211 parent_spec = CODING_SYSTEM_SPEC (parent);
5206 = CODING_SYSTEM_SPEC (buffer_defaults.buffer_file_coding_system);
5207 parent_eol_type = AREF (parent_spec, 2); 5212 parent_eol_type = AREF (parent_spec, 2);
5208 } 5213 }
5209 else 5214 else