summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2011-12-28 16:55:49 +0900
committerKenichi Handa <handa@m17n.org>2011-12-28 16:55:49 +0900
commit0e5317f7e42c1008c40305a94afcdff509a475be (patch)
tree57b7887393d3f896a7354c32c4702dc1f9da20a9
parent29a8b279e3a7764e424bc66711d1f79bf75242de (diff)
downloademacs-0e5317f7e42c1008c40305a94afcdff509a475be.tar.gz
coding.c: (Fdefine_coding_system_internal): Make an utf-8 base coding-system ASCII compatible only when it does not produce BOM on encoding (Bug#10383).
-rw-r--r--src/ChangeLog6
-rw-r--r--src/coding.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2c3644f14fa..f10e2955164 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-28 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
+ coding-system ASCII compatible only when it does not produce BOM
+ on encoding (Bug#10383).
+
2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
* xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
diff --git a/src/coding.c b/src/coding.c
index e15d725af3a..2db5385c932 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -9999,8 +9999,6 @@ usage: (define-coding-system-internal ...) */)
{
Lisp_Object bom;
- CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
-
if (nargs < coding_arg_utf8_max)
goto short_args;
@@ -10014,6 +10012,8 @@ usage: (define-coding-system-internal ...) */)
CHECK_CODING_SYSTEM (val);
}
ASET (attrs, coding_attr_utf_bom, bom);
+ if (NILP (bom))
+ CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
category = (CONSP (bom) ? coding_category_utf_8_auto
: NILP (bom) ? coding_category_utf_8_nosig