[Top][All Lists]

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

Re: font-lock-syntactic-keywords: evaluating arbitrary elisp inside matc

From: immerrr again
Subject: Re: font-lock-syntactic-keywords: evaluating arbitrary elisp inside matchers?
Date: Sat, 29 Sep 2012 10:50:26 +0400

On Fri, Sep 28, 2012 at 4:28 PM, Stefan Monnier <address@hidden> wrote:

There is such a rule: the definition of lua-syntax-propertize begins by
calling lua-syntax-propertize-string-or-comment-end which:

   and then in lua-syntax-propertize-string-or-comment I'd use syntax-ppss
   to check the parser state (i.e. determine if I'm in a type-b comment or
   delimited-string corresponding to a long-bracket construct as opposed to
   some type-a comment or standard string, or plain old code), and if I'm
   in one of those long-bracket-constructs, use (nth 8 ppss) to find the
   beginning, count the number of = used there, then search for the
   matching ]==] pattern and place the matching "> b" or "|" syntax on the
   second closing bracket.

so while the second call is for "end1+1 ... end2", your code will go
back to the beginning of the long bracket to figure out its end and then
look for that end again (which might show up before end2 this time, tho
maybe not).

Oh, my bad. Thanks a lot for your help!


reply via email to

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