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: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16915 <at> debbugs.gnu.org, Bozhidar Batsov <bozhidar <at> batsov.com>
Subject: bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly
Date: Mon, 10 Mar 2014 09:21:02 +0200
On 07.03.2014 23:04, Stefan Monnier wrote:
> My preference would be to think about it as a "multi-mode" case, and
> hence make it possible to specify a different syntax-table to use within
> the regexp.

I remember this idea, but have a hard time viewing it in the context of 
our latest discussion on the subject of multi-modes.

First, why only syntax-table? For this specific case, a syntax table 
change is not required, we only need to be able to view the text between 
/'s as a separate context (but - and this is a change from certain other 
multi-mode uses - still fontify uncommented text inside them with the 
regexp face). But in the general case, we would at least want to be able 
to change font-lock-keywords, too.

> I think of it along the lines of a new syntax-class, applied to the "/"
> char, which would change the syntax-table for the subsequent text.

How would this interact with a new hook that would `syntax-ppss' would 
run on the cached entries?

Would its default value look for the chars bearing the new syntax class?




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.