[Top][All Lists]

[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: Mon, 30 Jan 2006 10:58:05 -0800

        (define-key my-map [remap scroll-up] my-scroll-up)

        The `scroll-up' binding for `C-v' is remapped to `my-scroll-up', but
        the `scroll-up' binding for [next] is not remapped to

    Given that incomplete example,

What is incomplete about it? Let me know, and I'll try to complete it. (But
what you wrote below indicates that you understood what I meant OK.)

    I cannot see why that would happen. However, I tried an experiment,

        (define-key lisp-mode-map [remap scroll-up] 'my-scroll-up)
        (defun my-scroll-up ()
          (interactive)(message "Foo")(scroll-up))

    and it seems to be true that this kind of remap only applies
    to bindings in the same keymap that contains the remap.
    In that example, the remapping did not apply to C-v OR to <next>.

    This seems to be a bug.  The documentation in the Lisp Manual
    clearly says that the remap ought to apply to any binding
    that yields the command that has been remapped.

Yes, that was my interpretation too.

My workaround has been to use command remapping for `self-insert-command'
(since it takes much too long to use `substitute-key-definition') and to use
`substitute-key-definition' for all other such substitutions/remappings.

    Can someone please debug this, then ack?

reply via email to

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