emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multi-mode editing, including literate Haskell and noweb


From: Richard Stallman
Subject: Re: multi-mode editing, including literate Haskell and noweb
Date: Sun, 02 Jan 2005 11:06:24 -0500

A year after you posted it, I finally read the source code of install.el.
(I was far too backlogged to read source code last January.)

It looks like a plausible approach, and it suggested to me
an idea that could make matters simpler.  The idea is
to add a facility to swap certain buffer-local information
between a given indirect buffer and its base buffer.
By using this instead of selecting one of the indirect buffers,
it would be possible to do more or less what you've done,
but always keeping the base buffer selected.

I think a good first approximation to the set of buffer-local
information to swap would be all buffer-local variables that are not
permanent locals.  However, it would be necessary to think about each
of the built-in buffer slots to decide whether to swap it or not.

Aside from that, here are some other comments on where the code could
use work.

* There is a good reason why `multi-mode-alist' would be considered an
unsafe local variable.  This usage *is* unsafe; the value contains
functions to call.

These combinations cannot be defined through a local variable list.
Anything that would enable that would also enable viruses.  Each
multi-mode combination needs to have an explicit definition with Lisp
code.

* The hack used to avoid processing the `mode' local variable
is unclean; it needs to be done differently.  One easy way would be
to add a new argument to hack-local-variables, NO-MODES.
However, I think a cleaner idea is to record a list of what was
in the file's local variables list.  Then multi-mode could go through
it and process it in the appropriate way.

* multi-with-ignored-fn is very unclean and should not be installed.

* The doc string of multi-chunk-fns doesn't clearly say how the
values of the various functions are used in order to decide on
a chunk.  Looking at multi-find-mode-at, that seems to be nontrivial.


Have you done any work on this since a year ago?  Do you want to do
more?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]