[Top][All Lists]

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

Re: Example matcher function for font-lock-keywords?

From: Dmitry Gutov
Subject: Re: Example matcher function for font-lock-keywords?
Date: Thu, 26 Feb 2015 01:34:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 02/26/2015 01:28 AM, Alexis wrote:

Consequently, the syntax table for PicoLisp should designate
double-quotes as marking a symbol, not a string. This, however, means
that syntactic highlighting of comments doesn't work properly - for
example, when the comment character '#' appears inside a transient
symbol, it /shouldn't/ be treated as a comment character (and the
remainder of the line following it shouldn't be treated as a comment).

In all likelihood, that means you should implement a syntax-propertize-function, which would mark those occurrences of `#' with a different syntax class.

For usage examples, you can take a look at js-syntax-propertize and ruby-syntax-propertize-function.

reply via email to

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