emacs-devel
[Top][All Lists]
Advanced

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

Re: Customizing key bindings


From: Alex Schroeder
Subject: Re: Customizing key bindings
Date: Sat, 07 Sep 2002 16:08:59 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.90 (i686-pc-linux-gnu)

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

> This doesn't have to be the case.  The custom info can simply
> keep track of "what the user added with custom" and "what the user
> removed with custom" and custom-set-variable would simply take the
> current map and add/remove the corresponding entries.

Hm, but while we are in the same session, potential bug remain (the
ones that Per keeps talking about).

1. Load foo.el which uses defkeymap to create a keymap with binding A
   for one key.
2. Customize the keymap with binding B for the same key.  The shadowed
   binding A is saved.
3. Load foo-extra or call a hook that uses define-key to change the
   binding for the same key to C.
4. Customize the keymap.  I think it is ok to see binding C, because
   after all that is what happens to variables as well.  The problem
   is that when the user removes the binding for that key, we revert
   to binding A, instead of B.

We solved one particular problem which would have been solved with all
the other approaches as well.  When the original keybindings in the
source (defkeymap) get improved, the user benefits at all times.  So
that is not the benefit of the current solution, that is a benefit of
all solutions.

We had a solution using two variables instead of one, which was
considered a drawback.  In step 4, however, this two-variable solution
would have reverted to binding B.  This is what Per calls the 100%
solution.

I actually think that this last step to 100% is not really required,
so I am happy with the current code I posted.

Alex.




reply via email to

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