bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended s


From: Bozhidar Batsov
Subject: bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly
Date: Tue, 4 Mar 2014 12:02:06 +0200

On Sunday, March 2, 2014 at 5:03 PM, Dmitry Gutov wrote:
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.
That would be totally sufficient, but I have no idea how much work it would require. 

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.
Many modes introduce "non-standard” faces, so the lack of non-standard faces is not a significant problem I think (though I’d love to see faces for regexps, command execution (%x, `` as in sh-mode) and symbols/keywords (as they are present in many languages outside Ruby). 
 


reply via email to

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