help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Q1 - the keys' bindings to work more widely


From: Drew Adams
Subject: RE: [External] : Q1 - the keys' bindings to work more widely
Date: Tue, 17 Dec 2024 02:17:20 +0000

>> This is a keymap: '(keymap ("a" . #'kill-ring-save)))

It satisfies `keymapp', at least. ;-)  But unfortunately,
`keymapp' doesn't guarantee a keymap.  The Elisp manual
says it allows any list whose car is `keymap':

 More precisely, this function tests for a list whose CAR is
 ‘keymap’, or for a symbol whose function definition satisfies
 ‘keymapp’.

> Do you mean this:
>
> (define-minor-mode ttkeys-mode "Normal key bindings"
>:init-value 1 :lighter " TT" :global 1
>:keymap '(keymap ("a" . #'kill-ring-save)))
>
> Doesn't work either.

Try this:

:keymap '(keymap (?a . kill-ring-save)))

or this:

:keymap '(keymap (97 . kill-ring-save)))

https://www.gnu.org/software/emacs/manual/html_node/elisp/Format-of-Keymaps.html

reply via email to

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