GNU bug report logs - #16915
24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly

Previous Next

Package: emacs;

Reported by: Bozhidar Batsov <bozhidar <at> batsov.com>

Date: Sat, 1 Mar 2014 13:32:01 UTC

Severity: minor

Found in version 24.3.50

Full log


View this message in rfc822 format

From: Bozhidar Batsov <bozhidar <at> batsov.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 16915 <at> debbugs.gnu.org
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
[Message part 1 (text/plain, inline)]
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).  
  

[Message part 2 (text/html, inline)]

This bug report was last modified 11 years and 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.