[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
<URL:http://cvs.sourceforge.net/viewcvs.py/*checkout*/preview-latex/preview/lib/listsort.tex>.
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
sections?
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
- Re: Indentation problem in corporating major modes,
David Kastrup <=