emacs-devel
[Top][All Lists]
Advanced

[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

     https://github.com/ruby/ruby/commits/trunk/misc/ruby-mode.el

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

http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00126.html
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15535

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]