|
From: | Tatsu Takamaro |
Subject: | Re: [External] : Q1 - the keys' bindings to work more widely |
Date: | Tue, 17 Dec 2024 08:41:36 +0300 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 |
This one works: *:keymap '(keymap (?a . kill-ring-save)))*But I'm not sure why. I wrote the page you gave, and another one (https://www.gnu.org/software/emacs/manual/html_node/elisp/Classifying-Events.html) but I don't completely understand the meaning of sign ? before "a". It seems, this is to indicate a key(s) as an event, but I can't find the explaination of all such signs neither in the web nor in the official docs. Another sign of that kind is a backslash and as I got it should be in front on a modifier key. *But why? *You know it's always difficult to search the web by a one-digit symbol.
But yes, I managed to do what I wanted with this *(?\C-c . kill-ring-save)** **(?\C-a . mark-whole-buffer)* and so on. Thank you! Many problems of this kind are from not knowing Elisp. ^_^ вт, 17.12.2024 5:17, Drew Adams пишет:
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
[Prev in Thread] | Current Thread | [Next in Thread] |