[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small improvements to ruby-mode

From: Dmitry Gutov
Subject: Re: Small improvements to ruby-mode
Date: Wed, 10 Jul 2013 22:09:42 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

On 10.07.2013 10:09, Bozhidar Batsov wrote:
Normally I'd have been doing that from the start, but I'm not extremely
fond of Emacs's "issue tracker".

Me neither. It's better that no tracker at all, though.

> While class names are actually constants, the reverse is obviously
> not the same - therefore my desire to separate them.

Still, that's likely the original reason why they're highlighted with the same face. Class names are closer to constants than constants are to symbols.

> Since in a typical Ruby program class and module names are used much
> more than "regular" constants I don't think the change would be
> particularly disruptive.
> classes and modules continue to use the type face, constants start
> using the constant face, symbols continue to use the constant face
> (and optionally there is the ability to customize it). In the long
> run such a change would surely be beneficial.

I meant that we would preserve the equality between module name and constants' faces. So, if they both switch to font-lock-constant-face, this will be noticeable, as, like you said, module names are used a lot.

Symbols can then use type-face, or preprocessor-face, the latter would be a smidgen less inappropriate.

If you do want class names and constants to have different faces, there is an obvious question of ambiguity. Is "C" a class or a constant? I don't like the idea of it changing color after I type the second letter.

ST2 doesn't seem to highlight either, at all. RubyMine, from what I can tell from a Youtube video, either doesn't highlight them, or, depending on the context, highlights them with the same color (and symbols, too): http://www.youtube.com/watch?v=LnN-JIxDRCg#t=1464s

reply via email to

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