[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: Tue, 08 Oct 2013 13:55:46 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Hi Akinori,

On 07.10.2013 22:38, Akinori MUSHA wrote:

I've made some improvements to ruby-mode-set-encoding in order to:

- reflect the change of the default source encoding in Ruby 2.0
- add support for prefer-utf-8 introduced in Emacs trunk
- add support for japanese-cp932 which was causing a problem


That's good timing, I've been trying to improve that function just recently:


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.

-- Dmitry

reply via email to

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