emacs-devel
[Top][All Lists]
Advanced

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

Re: Enhancements to "minor-mode-map-alist" functionality.


From: Stefan Monnier
Subject: Re: Enhancements to "minor-mode-map-alist" functionality.
Date: Wed, 08 May 2002 17:36:50 -0400

[ I just added Michael to the discussion. ]

> > The issue of ordering seems academic since I still haven't heard
> > of any piece of code that accidentally changes the ordering of entries
> > on minor-mode-map-alist.  Similarly I haven't heard of any case
> > where an entry is accidentally removed (this would simply be a bug).
> Ok, it's academic - but if there is a trivial method to avoid having to
> deal with this issue at all (and viper deals with this in a much more
> complex manner than cua does).

As I've explained a while back, there is a trivial method:
by convention, changing the order of (or removing) entries that do not
belong to you is a bug.  I.e. any package that changes the ordering of cua
or viper keymaps has a bug.  Right now I don't know of any such buggy package
and neither do you, it seems.
Maybe Michael Kifer does, but my bet is that he does not.  Then again,
why would anybody go through the trouble of being resilient to such bugs
if there is no evidence of their existence ?

In other words, the issue of accidental reordering and removal of
elements from minor-mode-map-alist is a non-issue and should be simply
ignored (until further evidence).  It cannot justify *any* change to the
code base whatsoever.

> > I thought the only real problem was that you needed your maps to be
> > at the head of minor-mode-map-alist to take precedence over all others.
> > (this applies both to cua and viper).
> True - and both cua and viper want their keymaps to be first ...
> But that is still only part of the problem.

That's the part that emulation-map-alist is trying to solve right ?
Does emulation-map-alist solve another problem as well ?

> > This is a problem because minor modes (almost) always add themselves
> > at the head of the list.
> yes, that's the main form of "messed up" minor-mode-map-alist.

And that's not too difficult to handle in a post-command-hook,
although it's admittedly ugly, especially when two or more packages
fight for "the head of the list" as is the case when you use both cua
and viper (do they even work together ?).


        Stefan




reply via email to

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