unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Indentation problem in corporating major modes
Date: Thu, 01 Dec 2005 12:09:54 +0100	[thread overview]
Message-ID: <854q5tgjjx.fsf@lola.goethe.zz> (raw)
In-Reply-To: <BAY112-F1393D7EB599F78485332E4DA4D0@phx.gbl> (Herbert Euler's message of "Thu, 01 Dec 2005 10:21:06 +0800")

"Herbert Euler" <herberteuler@hotmail.com> 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

  reply	other threads:[~2005-12-01 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01  2:21 Indentation problem in corporating major modes Herbert Euler
2005-12-01 11:09 ` David Kastrup [this message]
2005-12-02  2:07 ` Richard M. Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-11-28  4:39 Herbert Euler
2005-12-02  2:33 ` Herbert Euler

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=854q5tgjjx.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).