Subject: Re: bug#15535: Acknowledgement (24.3.50; basic-save-buffer should update buffer-file-coding-system value if the contents were written using different coding system)

From: Dmitry Gutov <[email-masked]>
Date: Sun, 06 Oct 2013 23:58:57 +0300

On 06.10.2013 19:51, Eli Zaretskii wrote:
> If the former, we could perhaps add some flag to struct undecided_spec
> and set it whenever the encoder used by `undecided' sees a non-ASCII
> character, and then use that flag to set last-coding-system-used to
> UTF-8.

That already happens (last-coding-system-used has the right value right 
after the file is written), but I don't think I can use it: even if 
`ruby-mode-set-encoding' is moved to after-save-hook, as long as it's 
not the first function in this hook (and I can't ensure that it is), the 
previous functions can also do some I/O and thus change 
last-coding-system-used's value.

And that the reason I reverted 114527 in 114533, which in turn sparked 
the discussion in emacs-devel.