]> git.eshelyaron.com Git - emacs.git/commitdiff
(encode_coding_emacs_mule): Be sure to set `code'.
authorKenichi Handa <handa@m17n.org>
Wed, 3 Dec 2008 06:35:02 +0000 (06:35 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 3 Dec 2008 06:35:02 +0000 (06:35 +0000)
src/coding.c

index 8890eb188ce1355c50c3070b2b2adfecb5db011b..ff0e5b0643eedf4defce32716d67dee98aac7936 100644 (file)
@@ -2449,8 +2449,10 @@ encode_coding_emacs_mule (coding)
          if (preferred_charset_id >= 0)
            {
              charset = CHARSET_FROM_ID (preferred_charset_id);
-             if (! CHAR_CHARSET_P (c, charset))
-               charset = char_charset (c, charset_list, NULL);
+             if (CHAR_CHARSET_P (c, charset))
+               code = ENCODE_CHAR (charset, c);
+             else
+               charset = char_charset (c, charset_list, &code);
            }
          else
            charset = char_charset (c, charset_list, &code);