* How does command remapping actually work?
@ 2021-07-29 5:12 Marcin Borkowski
2021-07-29 6:24 ` Eli Zaretskii
2021-07-29 22:34 ` Michael Heerdegen
0 siblings, 2 replies; 5+ messages in thread
From: Marcin Borkowski @ 2021-07-29 5:12 UTC (permalink / raw)
To: Help Gnu Emacs mailing list
Hi all,
I experimented a bit with command remapping, and it's great - but how
does it actually work? I mean, apparently it doesn't change the keymap,
and it's not stored in its symbol plist, so where is the remapping info
actually stored? IOW, what is changed when I evaluate things like
(define-key my-mode-map [remap kill-line] 'my-kill-line)
?
TIA,
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How does command remapping actually work?
2021-07-29 5:12 How does command remapping actually work? Marcin Borkowski
@ 2021-07-29 6:24 ` Eli Zaretskii
2021-07-30 16:17 ` Marcin Borkowski
2021-07-29 22:34 ` Michael Heerdegen
1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2021-07-29 6:24 UTC (permalink / raw)
To: help-gnu-emacs
> From: Marcin Borkowski <mbork@mbork.pl>
> Date: Thu, 29 Jul 2021 07:12:50 +0200
>
> I experimented a bit with command remapping, and it's great - but how
> does it actually work? I mean, apparently it doesn't change the keymap,
> and it's not stored in its symbol plist, so where is the remapping info
> actually stored? IOW, what is changed when I evaluate things like
>
> (define-key my-mode-map [remap kill-line] 'my-kill-line)
The 'remap' pseudo-key works via special handling in the low-level
keymap code, see the source of where-is-internal in keymap.c (search
for "Qremap").
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How does command remapping actually work?
2021-07-29 5:12 How does command remapping actually work? Marcin Borkowski
2021-07-29 6:24 ` Eli Zaretskii
@ 2021-07-29 22:34 ` Michael Heerdegen
2021-07-30 16:17 ` Marcin Borkowski
1 sibling, 1 reply; 5+ messages in thread
From: Michael Heerdegen @ 2021-07-29 22:34 UTC (permalink / raw)
To: help-gnu-emacs
Marcin Borkowski <mbork@mbork.pl> writes:
> Hi all,
>
> I experimented a bit with command remapping, and it's great - but how
> does it actually work? I mean, apparently it doesn't change the keymap,
> and it's not stored in its symbol plist, so where is the remapping info
> actually stored?
In the keymap.
Are you sure you have examined the right keymap and searched correctly?
These entries are not represented specially AFAIK. They are interpreted
differently, yes, but you should see entries in the keymap. Maybe you
got a submap using a `remap` prefix key?
Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How does command remapping actually work?
2021-07-29 22:34 ` Michael Heerdegen
@ 2021-07-30 16:17 ` Marcin Borkowski
0 siblings, 0 replies; 5+ messages in thread
From: Marcin Borkowski @ 2021-07-30 16:17 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
On 2021-07-30, at 00:34, Michael Heerdegen <michael_heerdegen@web.de> wrote:
> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> Hi all,
>>
>> I experimented a bit with command remapping, and it's great - but how
>> does it actually work? I mean, apparently it doesn't change the keymap,
>> and it's not stored in its symbol plist, so where is the remapping info
>> actually stored?
>
> In the keymap.
>
> Are you sure you have examined the right keymap and searched correctly?
> These entries are not represented specially AFAIK. They are interpreted
> differently, yes, but you should see entries in the keymap. Maybe you
> got a submap using a `remap` prefix key?
I stand corrected, you're right, of course.
Thanks,
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How does command remapping actually work?
2021-07-29 6:24 ` Eli Zaretskii
@ 2021-07-30 16:17 ` Marcin Borkowski
0 siblings, 0 replies; 5+ messages in thread
From: Marcin Borkowski @ 2021-07-30 16:17 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
On 2021-07-29, at 08:24, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Marcin Borkowski <mbork@mbork.pl>
>> Date: Thu, 29 Jul 2021 07:12:50 +0200
>>
>> I experimented a bit with command remapping, and it's great - but how
>> does it actually work? I mean, apparently it doesn't change the keymap,
>> and it's not stored in its symbol plist, so where is the remapping info
>> actually stored? IOW, what is changed when I evaluate things like
>>
>> (define-key my-mode-map [remap kill-line] 'my-kill-line)
>
> The 'remap' pseudo-key works via special handling in the low-level
> keymap code, see the source of where-is-internal in keymap.c (search
> for "Qremap").
Thanks!
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-30 16:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-29 5:12 How does command remapping actually work? Marcin Borkowski
2021-07-29 6:24 ` Eli Zaretskii
2021-07-30 16:17 ` Marcin Borkowski
2021-07-29 22:34 ` Michael Heerdegen
2021-07-30 16:17 ` Marcin Borkowski
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.