help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: syntax parsing of non-contiguous regions


From: Andreas Röhler
Subject: Re: syntax parsing of non-contiguous regions
Date: Sun, 20 Sep 2009 22:21:51 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

Alexander Katovsky wrote:
> Hi,
>
> I want Emacs' syntax motion functions to ignore certain regions of the
> buffer; i.e. to correctly parse non-contiguous regions. This can be
> done effectively if you can define the region to ignore as a comment
> and set parse-sexp-ignore-comments variable to true.
>
> Here's the problem. The primary mode has comments starting with '!'
> and ending with newline ('\n') and the buffer region I want ignored as
> a comment starts with "%{" and ends with "}%". However, I cannot see
> any way to define these both as comments. The mechanism to cope with
> multi-character comment delimiters in the syntax table is too specific
> to C to use here. Does anyone have any other suggestions,
> text-properties, for example?
>
> Thanks,
> Alex
>
>
>
>
>

Hi,

AFAIK: however you set the syntax of chars:
`forward-same-syntax' will stop at next syntax-change,
for example at a whitespace character inside a comment.

Don't think setting `parse-sexp-ignore-comments'
variable to true will change this, as it is set here that way
and doesn't hinder motion into comments.

Maybe can you tell more, what you are going to achieve,
what the issue behind is?

Cheers
Andreas

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/






reply via email to

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