Subject: Re: bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly

From: Dmitry Gutov <[email-masked]>
Date: Sun, 02 Mar 2014 17:03:10 +0200

On 02.03.2014 13:03, Bozhidar Batsov wrote:
> Native regexp support is preferable IMO. After all - regexps are not
> strings. If they were treated differently we’d also be able to have
> extra highlighting for things like named groups, quantifiers, regexp
> classes, etc. I guess, however, that this would require a lot of work.

Since the regexp syntax can be different between languages, we probably 
won't get all of that automatically. The direct benefits from the native 
support I can see is highlighting comments (for regexps with appropriate 
modifiers, in languages that support that), new faces for regexp itself, 
and maybe for groups, quantifiers, etc.

The highlighting of the elements inside regexp would probably have to be 
done the old-fashioned way, in font-lock-keywords (although that code 
could be shared between many languages). We could implement something 
like it right now, the main difference is just the lack of standard faces.