Subject: bug#17057: 24.3.50; [ruby-mode] Font-locking of special global variables like $$ is broken(missing)

From: Bozhidar Batsov <[email-masked]>
Date: Mon, 24 Mar 2014 11:45:01 +0200

On Monday, March 24, 2014 at 11:12 AM, Dmitry Gutov wrote:
> Version: 24.4
>  
> On 21.03.2014 16:53, Bozhidar Batsov wrote:
>  
> > Technically speaking all of those are keywords, not variables. Somewhat
> > odd __LINE__ and friends are
> > treated at string literals by the Ruby parser. As all of those evaluate
> > to some value unlike most other keywords I guess it makes some sense to
> > font-lock them as variables, but I’d prefer if we used font-locking that
> > makes their special status more apparent.
> >  
>  
>  
> Sounds good to me. Does this list look exhaustive to you?
>  
> http://www.zenspider.com/Languages/Ruby/QuickRef.html#pre-defined-variables
>  
Yeah, seems that everything important is listed there. Here’s one a bit more extensive list, though:

https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/style/global_vars.rb

It features the JRuby-specific global vars in addition to the standard ones.   
>  
> Aside from changing faces, the problems mentioned in this bug should be  
> fixed now, emacs-24 r116850.
>  
>  

Thanks!