>>>> "Jan" == Jan Vroonhof
<vroonhof(a)math.ethz.ch> writes:
Jan> jsc(a)w3health.com (Jin Choi) writes:
> useful not only for Microsoft's ASP syntax, but also for
other
> similar HTML templating languages.
Jan> And for yacc grammers, interface specifications etc. this is
Jan> going to become more and more important.
and don't forget Perl-degraded text.
> something that is feasible? What might be the best way to go
> about it, actually temporarily remove the non-code (or
> non-HTML) bits into another buffer,
Jan> A good start would be to implement the FSF's indirect
Jan> buffers.
I'm not sure what you have in mind, but if it is what I am fuzzily
rattling around in my own brain, why not generalize "indirect buffer"
to "buffers don't have modes, extents do"? Indirect buffers would
require you to explicitly switch buffers. You could write the code to
do this for the user, I suppose, but it would be ugly and error-prone.
I wouldn't want to try this with FSF-style overlays, but extents are
strong enough to hold it. I also think something like this is the
best way to generalize Mule.
Or "modes attached to extents can override buffer modes"? We already
do this to a certain extent with minor modes, or keymaps, anyway. I
don't like this as much as the radical change in abstraction above;
backwards compatibility would be trivially (I think) be achievable by
hanging the mode on an extent wrapped around the whole buffer.
Then you could use font-locking-like techniques to parse the buffer,
for dumb stuff like
<AOL>
Me too!
</AOL>
or full-blown syntax-driven editing for buffers conforming to an SGML
DTD.
And you could create a function to "change mode on the current region"
which is something I always want when editing HTML <PRE> elements and
LaTeX verbatim environments.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +1 (298) 53-5091