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: Mon, 21 Sep 2009 22:13:45 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

Alexander Katovsky wrote:
> Hi,
>
> Thanks for your reply.  The reason that I want to do this is to make a
> major mode that supports embedded code (i.e. two major  modes).  I
> have a strategy for doing this that would be well suited to my
> specific problem and is different from the multi-mode implementations
> I have seen.  The new mode will be derived from the primary mode.  The
> fontification in the primary mode will provide a hook that the derived
> mode can use to fontify the embedded code.  This will work very
> elegantly if I can define the embedded code as a comment in the
> derived mode.  In this way, the parent mode will simply ignore the
> embedded code entirely, so that it will not interfere in any way with
> the primary code, and I can decide what to do with it later.
>
>

ok. IMHO you don't need syntax-stuff installing a new comment-style. New
comment-settings inside a
let should work:

  (let ((comment-start "%{")
        (comment-end "}%"))
    MY-HIDE-or-IGNORE- functions

In case your comment-move-functions are buggy:  try
comment-lor.el


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]