# HG changeset patch # User Kenichi Handa # Date 1156164502 0 # Node ID fe721cfad011825ac86eb36c2a45b6bddb22cd0c # Parent 1519f5723a89e737a426b188e4f5ceb2c8af9880 (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. diff -r 1519f5723a89 -r fe721cfad011 src/coding.c --- a/src/coding.c Mon Aug 21 05:13:52 2006 +0000 +++ b/src/coding.c Mon Aug 21 12:48:22 2006 +0000 @@ -4963,8 +4963,14 @@ coding->mode = 0; coding->head_ascii = -1; - coding->common_flags - = (VECTORP (eol_type) ? CODING_REQUIRE_DETECTION_MASK : 0); + if (VECTORP (eol_type)) + coding->common_flags = (CODING_REQUIRE_DECODING_MASK + | CODING_REQUIRE_DETECTION_MASK); + else if (! EQ (eol_type, Qunix)) + coding->common_flags = (CODING_REQUIRE_DECODING_MASK + | CODING_REQUIRE_ENCODING_MASK); + else + coding->common_flags = 0; if (! NILP (CODING_ATTR_POST_READ (attrs))) coding->common_flags |= CODING_REQUIRE_DECODING_MASK; if (! NILP (CODING_ATTR_PRE_WRITE (attrs))) @@ -5202,8 +5208,7 @@ { Lisp_Object parent_spec; - parent_spec - = CODING_SYSTEM_SPEC (buffer_defaults.buffer_file_coding_system); + parent_spec = CODING_SYSTEM_SPEC (parent); parent_eol_type = AREF (parent_spec, 2); } else