[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock-syntactic-keywords: evaluating arbitrary elisp inside matc
Re: font-lock-syntactic-keywords: evaluating arbitrary elisp inside matchers?
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:
so while the second call is for "end1+1 ... end2", your code will go
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.
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
Oh, my bad. Thanks a lot for your help!