all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: rms@gnu.org
Cc: thomas.baumann@ch.tum.de, emacs-devel@gnu.org
Subject: Re: Weired side-effect of using the remap feature in keymaps
Date: Fri, 30 Mar 2007 23:40:02 +0200	[thread overview]
Message-ID: <d9d992cc4dc515c5d9eb6ca40c3151b6@science.uva.nl> (raw)
In-Reply-To: <E1HXOYn-0000lm-Sb@fencepost.gnu.org>


On Mar 30, 2007, at 23:23, Richard Stallman wrote:

>     1. Start Emacs with emacs -Q
>
>     2. Evaluate the following Lisp code:
>
> 	     ;; Define a keymap
> 	     (defvar my-dummy-map (make-keymap))
>
> 	     ;; Now use the remap feature to remap delete-backward-char
> 	     (define-key my-dummy-map
> 	       (vector 'remap 'delete-backward-char) 'backward-char)
>
> 	     ;; Create a buffer and actually install that map.  This step
> 	     ;; seems to be necessary for the bug to occcur.
> 	     (switch-to-buffer (get-buffer-create "foo"))
> 	     (use-local-map my-dummy-map)
>
>     3. Now, start calc with `M-x calc RET'.
>
>     4. If you now check the definition of the DEL key, for example with
> 	`C-h k DEL', you will see that in calc-mode, this key is now bound
> 	to `backward-char', even though the remapping was done in
> 	`my-dummy-map'.  When calc binds the DEL key, it actually scans the
> 	global map for any key bound to `delete-backward-char' using
>
> 	  (where-is-internal 'delete-backward-char global-map)
>
> 	This search seems to fail after the code above, i.e. something
> 	seems to have changed in global map which should not have changed.
>
> Nothing has changed in global-map.  When I do the same call to
> where-is-internal in some other buffer, it correctly returns ([127]).

I forgot to mention this:  I tried the same, and also found that it
would return ([127]).  However, when running the *compiled* calc.elc,
it returns nil.

- Carsten

  reply	other threads:[~2007-03-30 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ebfcad53abf79590bf2a1ea2073109e4@science.uva.nl>
2007-03-30 21:23 ` Weired side-effect of using the remap feature in keymaps Richard Stallman
2007-03-30 21:40   ` Carsten Dominik [this message]
2007-03-31 20:42     ` Richard 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=d9d992cc4dc515c5d9eb6ca40c3151b6@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=thomas.baumann@ch.tum.de \
    /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.