]> code.delx.au - gnu-emacs/commitdiff
coding.c (detect_coding): Set coding->id before calling this->detector.
authorKenichi Handa <handa@gnu.org>
Sat, 13 Oct 2012 12:58:52 +0000 (21:58 +0900)
committerKenichi Handa <handa@gnu.org>
Sat, 13 Oct 2012 12:58:52 +0000 (21:58 +0900)
src/ChangeLog
src/coding.c

index d753221b99640d143be13e146c2799f7edb46720..3787e006c4fe9bb55206b61a67539a7d37026cde 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-13  HANATAKA, Shinya  <bogytech@gmail.com>  (tiny change)
+
+       * coding.c (detect_coding): Set coding->id before calling
+       this->detector.
+
 2012-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * doc.c (get_doc_string): Don't signal an error if the file is missing.
index d9606cf5710427ba4828d1062e7e0bf12c78c374..412d724522390210fbded165e1bab481fc55ab7a 100644 (file)
@@ -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.  */