all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: Drew Adams <drew.adams@oracle.com>, emacs-devel@gnu.org
Subject: Re: command remapping problem
Date: Tue, 31 Jan 2006 14:56:41 +0100	[thread overview]
Message-ID: <m37j8gwleu.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1F3e2i-0004SC-22@fencepost.gnu.org> (Richard M. Stallman's message of "Mon, 30 Jan 2006 13:46:24 -0500")

"Richard M. Stallman" <rms@gnu.org> writes:

>     (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 `my-scroll-up'.
>
> Given that incomplete example, 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>.

Are you sure you are in a buffer which uses lisp-mode-map ?

If I execute the above commands and visit simple.el, it works
for me.

>
> 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.
>
> Can someone please debug this, then ack?

IW4M.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  parent reply	other threads:[~2006-01-31 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <MEEKKIABFKKDFJMPIOEBCEKECOAA.drew.adams@oracle.com>
2006-01-30 18:46 ` command remapping problem Richard M. Stallman
2006-01-30 18:46 ` Richard M. Stallman
2006-01-30 18:58   ` Drew Adams
2006-01-31 13:56   ` Kim F. Storm [this message]
2006-01-31 15:40     ` Luc Teirlinck
2006-01-31 23:11     ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m37j8gwleu.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.