* Re: Weired side-effect of using the remap feature in keymaps
[not found] <ebfcad53abf79590bf2a1ea2073109e4@science.uva.nl>
@ 2007-03-30 21:23 ` Richard Stallman
2007-03-30 21:40 ` Carsten Dominik
0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2007-03-30 21:23 UTC (permalink / raw)
To: Carsten Dominik; +Cc: thomas.baumann, emacs-devel
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]).
So it seems there is a bug in where-is-internal. When called that way,
it ought to ignore the local map, but it does not.
Can someone fix this bug, then ack?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Weired side-effect of using the remap feature in keymaps
2007-03-30 21:23 ` Weired side-effect of using the remap feature in keymaps Richard Stallman
@ 2007-03-30 21:40 ` Carsten Dominik
2007-03-31 20:42 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2007-03-30 21:40 UTC (permalink / raw)
To: rms; +Cc: thomas.baumann, emacs-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Weired side-effect of using the remap feature in keymaps
2007-03-30 21:40 ` Carsten Dominik
@ 2007-03-31 20:42 ` Richard Stallman
0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2007-03-31 20:42 UTC (permalink / raw)
To: Carsten Dominik; +Cc: thomas.baumann, emacs-devel
>
> 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.
I get the correct result in other buffers,
and the wrong result in the buffer that your example creates
which uses my-dummy-map.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-31 20:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2007-03-31 20:42 ` Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).