[Top][All Lists]

[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: Dmitry Gutov
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

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?

reply via email to

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