From: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: Lennart Borgman <lennart.borgman.073@student.lu.se>, emacs-devel@gnu.org
Subject: Re: PHP mode and mmm-mode
Date: Tue, 02 May 2006 22:29:04 +0200 [thread overview]
Message-ID: <m3iroo5fxr.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <c3f821000605012124s593bb81fv3a506fb98b2d7006@mail.gmail.com> (Michael Shulman's message of "Mon, 1 May 2006 23:24:41 -0500")
"Michael Shulman" <shulman@math.uchicago.edu> writes:
> For example, in certain modes (which I don't remember off the
> top of my head) indentation in submode regions is broken, while in
> others, quotation marks in one place can adversely affect the
> font-locking somewhere where they really shouldn't.
Well, that's to be expected, but if a convention for telling modes
what regions belongs to what modes, then these things can be fixed in
the relevant major modes.
We're not talking about hundreds of modes, either -- the number of
modes where mixing types is likely is probably pretty low. Say
10 to 20.
> This is fine as far as it goes, but it makes it hard
> to completely conceal extraneous parts of the buffer from modes that
> should not be paying attention to them, producing the above-mentioned
> problems with font-lock and indentation.
I just had a gross idea. Before calling any of the major-mode
functions (in response to, say, `TAB'), you'd make all the text that's
not in the current major mode invisible and intangible. Then each
major mode function would believe there was nothing but its own type
of text in the buffer.
The mmm minor mode would basically install a keymap that does
...
(make-other-text-invisible)
(call-real-function)
(make-other-text-visible-again)
...
The major mode would probably need a way to tell mmm which functions
would need this treatment.
> Perhaps an approach based on narrowing, or the creation of auxiliary
> buffers, might work better; I haven't really explored these
> possibilities.
I think using narrowing and auxiliary buffers would both be less than
optimal. When you program, you need to see the context.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
next prev parent reply other threads:[~2006-05-02 20:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 4:24 PHP mode and mmm-mode Michael Shulman
2006-05-02 8:10 ` martin rudalics
2006-05-02 14:57 ` Stefan Monnier
2006-05-02 20:29 ` Lars Magne Ingebrigtsen [this message]
2006-05-02 23:44 ` Nic
2006-05-03 3:11 ` David Hansen
2006-05-03 3:43 ` Stefan Monnier
2007-01-01 2:11 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3iroo5fxr.fsf@quimbies.gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman.073@student.lu.se \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.