emacs-pretest-bug
[Top][All Lists]
Advanced

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

RE: command remapping problem


From: Drew Adams
Subject: RE: command remapping problem
Date: Tue, 31 Jan 2006 10:08:03 -0800

    >     If this is the explanation, and this is not simply a bug,
    >     then I guess
    >     that would mean that there is no way to get the behavior of
    >     `substitute-key-definition's OLDMAP argument.

    What do you mean?
    That you cannot get OLDMAP behaviour with command remapping. True!
    But substitute-key-definition still has the OLDMAP arg.

But, in Emacs 22, `substitute-key-definition' is too slow, at least if
`self-insert-command' is involved.

    >     In that case, we have
    >     lost functionality in going to Emacs 22, because
    >     `substitute-key-definition' is unusable (at least with
    >     `self-insert-command'), for performance reasons.

    That is not a problem with command remapping, so don't blame command
    remapping of being inadequate as a substitute for some other feature
    it was not designed to replace (entirely).

Fair enough. I'm not trying to blame any particular part of Emacs. I'm only
interested in obtaining the functionality we had before with
`substitute-key-definition', including with arg OLDMAP. I was hoping that
command remapping might work for that, but I don't blame it, in particular,
for not substituting generally for `substitute-key-definition'.

    As I see it, command remapping works just fine for what it is designed
    to do (and I use it a lot).

Yes, it is very handy.

    In any case, why don't you just remap the self-insert-command in the
    buffer local map (e.g. minibuffer-local-completion-map) rather than
    in global map?  That should work just fine!

I'm not sure what you mean. Command remapping for `self-insert-command' is
not the problem - that works fine. As I said, I do, as a workaround, use
command remapping for `self-insert-command' and `substitute-key-definition'
for all other commands. This is a workaround because it requires
special-casing `self-insert-command'.

The problem is that I tried also using command remapping for other commands
that have multiple bindings and, as you pointed out, bindings that are
different in different maps. Because there is no OLDMAP arg for command
remapping, I cannot use it to substitute for the use case of
`substitute-key-definition' with OLDMAP.

I was hoping for a general solution that someone can use for all commands.
What I'm looking for is getting back the general functionality that
`substitute-key-definition' had in prior versions - be able to use it (or
something equivalent) on all commands, without incurring a performance
penalty. Command remapping won't do that (because it doesn't provide for an
OLDMAP arg) - as you say, it was not designed to do that. But there is
currently nothing that will do that (IIUC).






reply via email to

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