emacs-devel
[Top][All Lists]
Advanced

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

Re: enriched-mode and switching major modes.


From: Richard Stallman
Subject: Re: enriched-mode and switching major modes.
Date: Sun, 12 Sep 2004 05:10:35 -0400

      I believe that we still
    have to use post-command-hook to avoid possibly very annoying and
    confusing inconsistencies that could otherwise arise in the case of
    error or quit (as well as for major modes that do not use
    `run-mode-hooks').

I want to avoid using post-command-hook for this, because it is not
clean and reliable.  It more or less does the right thing, in most
cases, but not exactly, and not always.

The right thing to do in case of an error would be to restore these
bindings as part of error handling.

Or, alternatively, there could be a list of local variables not to
kill when changing major modes.  This list would itself be local
(that's how it differs from making the variables permanent).  Enriched
mode would put them onto this list.  That way, it would not have to do
anything like turn itself off and on.

As regards the key bindings, it ought to do them with a minor mode
keymap instead of its current method.  That would be much cleaner
anyway.  Probably it was written before the minor mode keymap feature
existed.

Want to try it that way?




reply via email to

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