aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2003-11-23 02:17:20 +0000
committerKenichi Handa2003-11-23 02:17:20 +0000
commit2bc515e458ece0e19e7842a10f4d6f5c992a5e69 (patch)
tree6e4fb8be3d36c640bb3759831e552ee5e18525f4 /src/coding.c
parent0fabd612e257cbcf8200489259f6458e87129667 (diff)
downloademacs-2bc515e458ece0e19e7842a10f4d6f5c992a5e69.tar.gz
emacs-2bc515e458ece0e19e7842a10f4d6f5c992a5e69.zip
(Fdefine_coding_system_internal): Fix checking of ascii compatibility.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/coding.c b/src/coding.c
index c153ebb1f3a..a7b4a7a4a75 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -8107,7 +8107,6 @@ usage: (define-coding-system-internal ...) */)
8107 8107
8108 if (EQ (coding_type, Qcharset)) 8108 if (EQ (coding_type, Qcharset))
8109 { 8109 {
8110 Lisp_Object list;
8111 /* Generate a lisp vector of 256 elements. Each element is nil, 8110 /* Generate a lisp vector of 256 elements. Each element is nil,
8112 integer, or a list of charset IDs. 8111 integer, or a list of charset IDs.
8113 8112
@@ -8119,8 +8118,10 @@ usage: (define-coding-system-internal ...) */)
8119 8118
8120 If Nth element is a list of charset IDs, N is the first byte 8119 If Nth element is a list of charset IDs, N is the first byte
8121 of one of them. The list is sorted by dimensions of the 8120 of one of them. The list is sorted by dimensions of the
8122 charsets. A charset of smaller dimension comes firtst. 8121 charsets. A charset of smaller dimension comes firtst. */
8123 */ 8122 Lisp_Object list;
8123 int maybe_ascii_compatible = 1;
8124
8124 for (list = Qnil, tail = charset_list; CONSP (tail); tail = XCDR (tail)) 8125 for (list = Qnil, tail = charset_list; CONSP (tail); tail = XCDR (tail))
8125 { 8126 {
8126 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail))); 8127 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail)));
@@ -8130,6 +8131,7 @@ usage: (define-coding-system-internal ...) */)
8130 val = CHARSET_SUPERSET (charset); 8131 val = CHARSET_SUPERSET (charset);
8131 for (; CONSP (val); val = XCDR (val)) 8132 for (; CONSP (val); val = XCDR (val))
8132 list = Fcons (XCAR (XCAR (val)), list); 8133 list = Fcons (XCAR (XCAR (val)), list);
8134 maybe_ascii_compatible = 0;
8133 } 8135 }
8134 else 8136 else
8135 list = Fcons (XCAR (tail), list); 8137 list = Fcons (XCAR (tail), list);
@@ -8143,7 +8145,8 @@ usage: (define-coding-system-internal ...) */)
8143 int dim = CHARSET_DIMENSION (charset); 8145 int dim = CHARSET_DIMENSION (charset);
8144 int idx = (dim - 1) * 4; 8146 int idx = (dim - 1) * 4;
8145 8147
8146 if (CHARSET_ASCII_COMPATIBLE_P (charset)) 8148 if (CHARSET_ASCII_COMPATIBLE_P (charset)
8149 && maybe_ascii_compatible)
8147 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 8150 CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
8148 8151
8149 for (i = charset->code_space[idx]; 8152 for (i = charset->code_space[idx];