[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PHP mode and mmm-mode
From: |
Stefan Monnier |
Subject: |
Re: PHP mode and mmm-mode |
Date: |
Tue, 02 May 2006 23:43:10 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> 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.
Even if that's not true, it's not a problem: there is simply no other way to
to fix each mode one by one anyway, and every mode that's adjusted is
a step forward.
> 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.
I'd rather play with syntax-tables to mark them as comments. Or use
narrowing (together with some convention for how to transfer
parse-state-info from one chunk to another). The `intangible' property is
just extremely difficult to live with.
Stefan