unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Small improvements to ruby-mode
@ 2013-06-21 16:00 Bozhidar Batsov
  2013-06-21 19:10 ` Stefan Monnier
  0 siblings, 1 reply; 72+ messages in thread
From: Bozhidar Batsov @ 2013-06-21 16:00 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]

Hi guys, 

Here's a list of small improvements to ruby-mode that we might want to include in a future version of Emacs:

* Font-lock changes

Some of the Ruby "keywords" that are currently highlighted as keywords are not actually Ruby keywords, but plain methods - alias_method, module_function, throw, raise, private, protected, public. I feel that they should not be highlighted like this to keep the highlighting syntactically correct. Technically speaking true, false and self are also keywords, but given their semantics I guess the current highlighting is ok. 

On a related note I think that it would make sense to use font-lock-builtin-face for methods like  alias_method, module_function, throw, raise, private, protected, public and other keyword like methods for Kernel and Module. I feel that such a move would increase the readability of the Ruby source code.

* Treat more filenames/file extensions as Ruby code

Most Rubyists these days have to add the following in their Emacs config:

(add-to-list 'auto-mode-alist '("\\.rake\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Guardfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Capfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.thor\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Thorfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.jbuilder\\'" . ruby-mode))

I think it's time the defaults in ruby-mode be updated to include them.

* Implement some ruby-tools like commands in ruby-mode

ruby-tools is a small package, that adds some extra code manipulation commands https://github.com/rejeep/ruby-tools

The commands there need a bit of polish, but are generally a step in the right direction IMO.
A least of a few of the commands there deserve to be part of ruby-mode itself, so more users would get to use them.

I have other crazier ideas, but I'll stop for now :-)

I'd like to hear what you think! 

I can make the necessary changes and provide patches if you think that my suggestions make sense. 

-- 
Cheers,
Bozhidar


[-- Attachment #2: Type: text/html, Size: 3845 bytes --]

^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2013-09-13 13:27 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 16:00 Small improvements to ruby-mode Bozhidar Batsov
2013-06-21 19:10 ` Stefan Monnier
2013-06-21 23:31   ` Dmitry Gutov
2013-06-21 23:45     ` Glenn Morris
2013-06-22  0:12       ` Dmitry Gutov
2013-06-22  7:05     ` Bozhidar Batsov
2013-06-22 13:28       ` Dmitry Gutov
2013-06-22 15:30         ` Stefan Monnier
2013-06-23  6:20         ` Bozhidar Batsov
2013-06-23 12:30           ` Dmitry Gutov
2013-06-24 13:49             ` Bozhidar Batsov
2013-07-01 18:32               ` Dmitry Gutov
2013-07-01 21:41                 ` Bozhidar Batsov
2013-07-01 21:50                   ` Dmitry Gutov
     [not found]                     ` <CAM9Zgm3Uw-TfW9aT7zdA1r=etsb26xAcW7DHJ_7=NfArFE8e5A@mail.gmail.com>
2013-07-02 18:38                       ` Dmitry Gutov
2013-07-03 15:46                         ` Dmitry Gutov
     [not found]                           ` <CAM9Zgm1_Jmn7Z4ZwSkPURAFOdTCURQP-TEDeys0dR4Uqyr8mfw@mail.gmail.com>
2013-07-05 10:30                             ` Dmitry Gutov
2013-07-05 11:08                               ` Stefan Monnier
2013-07-05 11:55                                 ` Dmitry Gutov
2013-07-05 22:18                                   ` Stefan Monnier
2013-07-05 13:01                               ` Bozhidar Batsov
2013-07-05 14:15                                 ` Dmitry Gutov
2013-07-06  5:31                                   ` Bozhidar Batsov
2013-07-06  9:37                                     ` Dmitry Gutov
2013-07-06 12:23                                       ` Bozhidar Batsov
2013-07-06 15:47                                         ` Dmitry Gutov
2013-07-07 21:56                                     ` Stefan Monnier
2013-07-07 23:22                                       ` Dmitry Gutov
2013-07-08  9:22                                         ` Stefan Monnier
2013-07-09  0:40                                           ` Dmitry Gutov
2013-07-09  8:50                                             ` Stefan Monnier
2013-07-09 12:57                                             ` Bozhidar Batsov
2013-07-08  9:33                                       ` Bozhidar Batsov
2013-07-08  9:37                                         ` Bozhidar Batsov
2013-07-09  1:19                                           ` Dmitry Gutov
2013-07-09 12:55                                             ` Bozhidar Batsov
2013-07-09 14:36                                               ` Bozhidar Batsov
2013-07-09 16:07                                                 ` Bozhidar Batsov
2013-07-09 17:18                                                   ` Dmitry Gutov
2013-07-10  6:23                                                     ` Bozhidar Batsov
2013-07-09 17:09                                                 ` Dmitry Gutov
2013-07-10  6:09                                                   ` Bozhidar Batsov
2013-07-10 18:09                                                     ` Dmitry Gutov
2013-07-11 11:23                                                       ` Bozhidar Batsov
2013-07-12 20:31                                                         ` Dmitry Gutov
     [not found]                                                           ` <CAM9Zgm2NbtNkm8p+SL=kYd-u90r5ELTvJrj4rxm8_Yk5QVN4WA@mail.gmail.com>
2013-07-13 10:24                                                             ` Bozhidar Batsov
2013-07-13 19:10                                                             ` Dmitry Gutov
2013-07-15 13:53                                                               ` Bozhidar Batsov
2013-07-16 13:18                                                                 ` Bozhidar Batsov
2013-07-16 14:47                                                                   ` Dmitry Gutov
2013-08-08 15:56                                                                     ` Bozhidar Batsov
2013-08-08 21:21                                                                       ` Dmitry Gutov
2013-08-08 22:47                                                                         ` Stefan Monnier
2013-08-08 23:54                                                                           ` Dmitry Gutov
2013-08-09 14:52                                                                             ` Stefan Monnier
2013-08-10 11:45                                                                               ` Dmitry Gutov
2013-08-10 13:23                                                                                 ` Stefan Monnier
2013-08-11 11:54                                                                                 ` Bozhidar Batsov
2013-08-11 13:08                                                                                   ` Dmitry Gutov
2013-08-11 14:08                                                                                     ` Johan Andersson
2013-08-11 14:29                                                                                       ` Dmitry Gutov
2013-08-11 15:18                                                                                         ` Johan Andersson
2013-08-11 16:56                                                                                           ` Stefan Monnier
2013-08-11 20:55                                                                                             ` Johan Andersson
2013-08-12  1:52                                                                                               ` Stefan Monnier
2013-09-13  9:10                                                                                                 ` Bozhidar Batsov
2013-09-13  9:26                                                                                                   ` Johan Andersson
2013-09-13 13:24                                                                                                     ` Stefan Monnier
2013-09-13 13:27                                                                                                       ` Johan Andersson
2013-07-05 22:35                                 ` Stefan Monnier
2013-07-06  5:14                                   ` Bozhidar Batsov
2013-07-06  9:38                                     ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).