Edwin Leuven <[EMAIL PROTECTED]> writes:

> i read that, and i find this "wildcard" notion very strange. perhaps i
> am overseeing something, but why don't we have an interface where
>
> \bind "" "buffer-close"
> simply means "there is no key binding associated with buffer-close" etc?

I really prefer
\bind "C-w" ""
meaning ``do not bind C-w to (presumably) buffer-close''.

> the fact that the gui becomes very complicated also suggest that
> something is wrong since this stuff shouldn't be complicated.

Here s my view on how it could work (in horrible pseudo-code):

1/ the reference binding set (e.g. cua) is loaded and saved.

  toplevelKeyMap().load(bind_file);
  KeyMap refkeymap = topLevelKeyMap();

2/ then the user bindings are loaded on top

   toplevelKeyMap().load(user_file);

3/ there is only one possible operation possible in the user bind
file: override a binding. When overriding a binding with empty string
(AKA LFUN_NOACTION), the binding remains in the table, but it is
equivalent to removing it.

4/ since the two tables are in sync (each entry of refkeymap
correspond to an entry in user_keymap at the _same_ location, because
their is no deletion and insertion is done at the end of the table),
it is possible quickly to make a diff between the two tables, either
for the purpose of outputting user.bind or for display purpose in the
UI (just put the entry in bold).

Binding a function to something which is already a prefix can be
forbidden for now, as it has always been.

Bo, what is the part that would not work in this scheme?

JMarc

Reply via email to