From: Alexander Katovsky <alexander.katovsky@googlemail.com>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: syntax parsing of non-contiguous regions
Date: Mon, 21 Sep 2009 23:18:16 +0100 [thread overview]
Message-ID: <4AB7FBA8.3040404@googlemail.com> (raw)
I'm afraid I'm being a little slow understanding you're suggestion.
I've already defined comment-start and comment-end as '!' and '\n'
respectively. Also, I need all the syntax motion functions
(forward-sexp, parse-partial-sexp et al) to treat the embedded code as a
comment so that the embedded code does not disrupt syntax motion
outside. For example, suppose that my primary mode is for code
consisting of named blocks with comments starting with '!' and ending
with newline, and my embedded code is C. Then we could have
named-block ! some comment
{
%{
if(a != b){}
}%
}
Then the syntax motion functions would completely ignore the embedded
code, just as it would a comment. So if point is before the first
opening brace then, no matter what's inside %{}%, forward-sexp would
place point at the last closing brace. And all the other syntax
functions would just 'work' as well!
I'd be very grateful if could explain in a little more detail exactly
what the 'hide-or-ignore' functions that you suggest are and how they
could be used to achieve this effect.
Thanks,
Alex
next reply other threads:[~2009-09-21 22:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 22:18 Alexander Katovsky [this message]
2009-09-22 5:42 ` syntax parsing of non-contiguous regions Andreas Röhler
-- strict thread matches above, loose matches on Subject: below --
2009-09-19 20:14 Alexander Katovsky
2009-09-20 19:53 ` Andreas Politz
2009-09-20 20:21 ` Andreas Röhler
2009-09-21 19:28 ` Alexander Katovsky
2009-09-21 20:13 ` Andreas Röhler
2009-09-21 21:55 ` Lennart Borgman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AB7FBA8.3040404@googlemail.com \
--to=alexander.katovsky@googlemail.com \
--cc=andreas.roehler@easy-emacs.de \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.