Subject: 23.3.50; encode-coding-string does not set last-coding-system-used
From: Kazuhiro Ito <[email-masked]>
To: [email-masked]
Date: Fri, 27 May 2011 18:50:22 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

When I start emacs (emacs-23 branch and trunk) with -Q and evaluate
below code, I receive unexpected result.

(list
 (progn
   (decode-coding-string "" 'iso-8859-1)
   last-coding-system-used)
 (progn
   (encode-coding-string "" 'no-conversion)
   last-coding-system-used))

It returns

(iso-8859-1 iso-8859-1)

But I expect below result

(iso-8859-1 no-conversion)

Please see the attached patch.
-- 
Kazuhiro Ito