From: Dmitry Gutov <dgutov@yandex.ru>
To: Bozhidar Batsov <bozhidar@batsov.com>
Cc: emacs-devel@gnu.org
Subject: Re: trunk r115036: * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding): Use
Date: Fri, 08 Nov 2013 19:58:38 +0200 [thread overview]
Message-ID: <87zjpehj1t.fsf@yandex.ru> (raw)
In-Reply-To: <E1VeoWf-0002wa-2m@vcs.savannah.gnu.org> (Bozhidar Batsov's message of "Fri, 08 Nov 2013 16:03:13 +0000")
Bozhidar Batsov <bozhidar@batsov.com> writes:
> ------------------------------------------------------------
> revno: 115036
> revision-id: bozhidar@batsov.com-20131108160155-qqqzvzyv7buc7r1v
> parent: dgutov@yandex.ru-20131108112252-g8bofo4jray5k45v
> committer: Bozhidar Batsov <bozhidar@batsov.com>
> branch nick: master
> timestamp: Fri 2013-11-08 18:01:55 +0200
> +(defcustom ruby-encoding-magic-comment-style 'ruby
I though we agreed that the default won't change: still Emacs. AFAIK,
it has the benefit of making sure Emacs uses the specified encoding.
I could be wrong, though.
> + "The style of the magic encoding comment to use."
> + :type '(choice
> + (const :tag "Emacs Style" emacs)
> + (const :tag "Ruby Style" ruby)
> + (const :tag "Custom Style" custom))
> + :group 'ruby)
> +
> +(defcustom ruby-custom-encoding-magic-comment-template "# coding: %s"
The way this template is duplicated below for the `ruby' case doesn't
look too nice. Since you went ahead with symbol-based customization,
why not drop the "custom" case?
> - (insert "# -*- coding: " coding-system " -*-\n"))))
> + (let ((encoding-magic-comment-template
> + (case ruby-encoding-magic-comment-style
> + ('ruby "# coding: %s")
> + ('emacs "# -*- coding: %s -*-")
> + ('custom ruby-custom-encoding-magic-comment-template))))
next parent reply other threads:[~2013-11-08 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1VeoWf-0002wa-2m@vcs.savannah.gnu.org>
2013-11-08 17:58 ` Dmitry Gutov [this message]
2013-11-08 18:23 ` trunk r115036: * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding): Use Bozhidar Batsov
2013-11-08 19:16 ` Dmitry Gutov
2013-11-08 19:04 ` Stefan Monnier
2013-11-08 19:48 ` Bozhidar Batsov
2013-11-08 20:35 ` Stefan Monnier
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=87zjpehj1t.fsf@yandex.ru \
--to=dgutov@yandex.ru \
--cc=bozhidar@batsov.com \
--cc=emacs-devel@gnu.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.