From: Dmitry Gutov <dgutov@yandex.ru>
To: Akinori MUSHA <knu@iDaemons.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: ruby-mode.el updated
Date: Tue, 08 Oct 2013 13:55:46 +0300 [thread overview]
Message-ID: <5253E4B2.5090406@yandex.ru> (raw)
In-Reply-To: <864n8sj2h8.knu@iDaemons.org>
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
next parent reply other threads:[~2013-10-08 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <864n8sj2h8.knu@iDaemons.org>
2013-10-08 10:55 ` Dmitry Gutov [this message]
2013-10-14 0:36 ` ruby-mode.el updated Dmitry Gutov
2013-10-14 14:49 ` Akinori MUSHA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5253E4B2.5090406@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=knu@iDaemons.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.