|
From: | Bozhidar Batsov |
Subject: | bug#17057: 24.3.50; [ruby-mode] Font-locking of special global variables like $$ is broken(missing) |
Date: | Sat, 22 Mar 2014 12:02:10 +0200 |
On Friday, March 21, 2014 at 4:47 PM, Dmitry Gutov wrote:Bozhidar Batsov <bozhidar@batsov.com> writes:Here's a few examples:"this is #$$"var = $!Things are different for:"this is #$1"var = $1Have you tried it in the latest Emacs? For me, only one example"this is #$$"is not highlighted (I'll fix that).There's another thing to consider - do built-in global vars should befont-locked like built-ins or like the other (user-defined) globalvariables? Personally I'd font-lock them as built-in to underline theirsignificance.Hmmm, maybe. But we also highlight nil, self, true, false, __LINE__,__ENCODING__ and __FILE__ with font-lock-variable-name-face. Should wechange these, too?Technically speaking all of those are keywords, not variables. Somewhat odd __LINE__ and friends aretreated 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.
[Prev in Thread] | Current Thread | [Next in Thread] |