From 0ba06a77fd4ccf92f1106b8ab7d8d64d6d812a1d Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 13 Oct 2012 21:58:52 +0900 Subject: [PATCH] coding.c (detect_coding): Set coding->id before calling this->detector. --- src/ChangeLog | 5 +++++ src/coding.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d753221b996..3787e006c4f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-10-13 HANATAKA, Shinya (tiny change) + + * coding.c (detect_coding): Set coding->id before calling + this->detector. + 2012-10-12 Stefan Monnier * doc.c (get_doc_string): Don't signal an error if the file is missing. diff --git a/src/coding.c b/src/coding.c index d9606cf5710..412d7245223 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6301,6 +6301,9 @@ detect_coding (struct coding_system *coding) { category = coding_priorities[i]; this = coding_categories + category; + /* Some of this->detector (e.g. detect_coding_sjis) + require this information. */ + coding->id = this->id; if (this->id < 0) { /* No coding system of this category is defined. */ -- 2.39.2