[Top][All Lists]

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

Re: Proposal: Remap interactive commands via keymaps

From: Tak Ota
Subject: Re: Proposal: Remap interactive commands via keymaps
Date: Fri, 04 Jan 2002 16:01:14 -0800 (PST)

Fri, 4 Jan 2002 16:09:37 -0700 (MST): Richard Stallman <address@hidden> wrote:

>     How is this different from substitute-key-definition?  What am I
>     missing?
> You might be able to get the same jobs done with
> substitute-key-definition, but this is a lot more elegant--the code
> and the data structures would be simpler.  And this is more robust
> in its handling of subsequent rebinding of the other keymap.
> I think this is a great idea.

I think so too.

I had to deal with the same problem in table.el and noticed Kim's
original example of substituting self-insert-command with
x-self-insert-command had more meaning than he mentioned.  When using
substitute-key-definition with global-map as the OLDMAP, it is not
easy to substitute all self-insert-command since some global-map
entries are mapped to a symbol whose function definition is a keymap
or even a "would be loaded" keymap (i.e. iso-transl-ctl-x-8-map).  In
this case, the original keymap can not be altered so a copy of the
original must be created and then map it to an alternative symbol and
be placed in the KEYMAP.  This symbol hunting must be performed
recursively.  The proposed method eliminates this cumbersome work all


reply via email to

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