[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15535: Acknowledgement (24.3.50; basic-save-buffer should update buf
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)
Mon, 07 Oct 2013 07:00:42 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0
On 07.10.2013 05:52, Eli Zaretskii wrote:
Not here, it doesn't. I see 'undecided'. And that is part of the
True, sorry. It worked for me previously, but I guess the value was
similarly spoiled by some other function in after-save-hook.
`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
You can always take the value of last-coding-system-used as the first
thing you do.
If "I" am a function inside after-save-hook, I don't control the "first
But now I see that `basic-save-buffer' does save the value of
`last-coding-system-used' to either `save-buffer-coding-system' or
`buffer-file-coding-system', depending on whether the former is non-nil.
So I can use those, and the problem is reduced to having the right
`last-coding-system-used' value set.