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

From: Dmitry Gutov <[email-masked]>
Date: Mon, 24 Mar 2014 09:33:26 +0200

On 22.03.2014 12:05, Bozhidar Batsov wrote:

> $1 gets font-locked immediately, but $$ currently gets font-locked only
> after some “word-boundary” character gets inserted (like space, newline,
> etc).

Here's the relevant matcher, it's pretty old:

"\\(\\$\\([^a-zA-Z0-9 \n]\\|[0-9]\\)\\)\\W"

Apparently, it was meant as a light-weight syntax hint: no highlighting 
means syntax error.

Very ad-hoc, so I'm up for removing it.

($1 also hits another matcher because 1 has the word syntax).