From: Kenichi Handa Date: Wed, 3 Dec 2008 06:35:02 +0000 (+0000) Subject: (encode_coding_emacs_mule): Be sure to set `code'. X-Git-Tag: emacs-pretest-23.0.90~1314 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=905ca9d2127e4f00ee2f936c22f98474a140000d;p=emacs.git (encode_coding_emacs_mule): Be sure to set `code'. --- diff --git a/src/coding.c b/src/coding.c index 8890eb188ce..ff0e5b0643e 100644 --- a/src/coding.c +++ b/src/coding.c @@ -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);