[Top][All Lists]

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

Re: Indentation problem in corporating major modes

From: David Kastrup
Subject: Re: Indentation problem in corporating major modes
Date: Thu, 01 Dec 2005 12:09:54 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Herbert Euler" <address@hidden> writes:

> I saw the following in etc/TODO:
>>** Implement a clean way to use different major modes for
>>   different parts of a buffer.  This could be useful in editing
>>   Bison input files, for instance, or other kinds of text
>>   where one language is embedded in another language.
> What does clean mean here? Is mmm-mode not clean enough?

For one thing, it is not an integral part of Emacs.  For another, it
does not keep indentation, syntax coloring and similar separate for
chunks of different languages.  From the time I tried applying it to
my problems I seem to remember that it did not provide clean hooks for
adding new language combinations.  As a very simple example, take the
code at
Can you coax mmm-mode into a mode of working where it will maintain
proper indentation across all corresponding C snippets and do paren
matching and stuff only for the C parts as long as you are in the C

That's what would be required for editing this sort of thing.

Basically, things like syntax tables and modes would need to be
specifiable by overlays or text properties, and one would need a way
to tie physically apart parts in one language together for the purpose
of syntactical matching and indentation.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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