From: immerrr again <immerrr+lua@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: font-lock-syntactic-keywords: evaluating arbitrary elisp inside matchers?
Date: Sat, 29 Sep 2012 10:50:26 +0400 [thread overview]
Message-ID: <CAERznn_ZRX7Sjiy-yCN+zOA6M6m0Leh6LDRpK_=y6MORgHCj4g@mail.gmail.com> (raw)
In-Reply-To: <jwvr4pms5g9.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
On Fri, Sep 28, 2012 at 4:28 PM, Stefan Monnier <monnier@iro.umontreal.ca>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!
>
--
Cheers,
immerrr
[-- Attachment #2: Type: text/html, Size: 1770 bytes --]
next prev parent reply other threads:[~2012-09-29 6:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 20:48 font-lock-syntactic-keywords: evaluating arbitrary elisp inside matchers? immerrr again...
2012-09-25 1:03 ` Stefan Monnier
2012-09-25 11:31 ` immerrr again...
2012-09-25 13:20 ` Stefan Monnier
2012-09-28 8:19 ` immerrr again
2012-09-28 12:28 ` Stefan Monnier
2012-09-29 6:50 ` immerrr again [this message]
2013-03-26 13:48 ` immerrr again
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAERznn_ZRX7Sjiy-yCN+zOA6M6m0Leh6LDRpK_=y6MORgHCj4g@mail.gmail.com' \
--to=immerrr+lua@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).