[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ruby-mode.el updated

From: Dmitry Gutov
Subject: Re: ruby-mode.el updated
Date: Mon, 14 Oct 2013 03:36:46 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 08.10.2013 13:55, Dmitry Gutov wrote:
Your approach with explicitly following how the encoder works (looking
up :prefer-utf-8 property, and defaulting to
default-buffer-file-coding-system) is workable, but I'd rather move
ruby-mode-set-encoding to after-save-hook and just use the exact
encoding that was used to save the file (after #15535 is fixed,
hopefully soon).

And speaking of "reflect the change of the default source encoding in
Ruby 2.0", are you sure it's a good idea to do now?

Some people are still using Ruby 1.9.3 in production (myself included),
so I'd rather the defaults were safe for this use case.

I've installed your changes, aside from those mentioned above, in revision 114654. Please test and see if I've missed anything.

Calling `ruby-mode-set-encoding' in `after-save-hook' is a bit questionable, but this way we don't depend on low-level details of how coding systems in Emacs work.

One drawback that I've seen so far is that `flymake-after-save-hook' usually ends up before `ruby-mode-set-encoding', so it will show an error, once.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]