Timeline for Key binding to `C-<` and `C->` not working when creating minor mode
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 27, 2022 at 14:47 | comment | added | Alessandro Bertulli |
This worked out, thanks to both. Tried in my config, (kbd "<") evaluates to "<" , while (kbd "C-<") evaluates to [67108924] . Maybe is this the cause of the difference? Single-char sequences evaluates to themselves, making them effectively suitable to be placed in the bindings list
|
|
Feb 27, 2022 at 14:43 | vote | accept | Alessandro Bertulli | ||
Feb 25, 2022 at 22:34 | comment | added | Drew |
Yes, I agree. Your answer is correct. But the "tolerance" (if that's what it is) of (kbd "<") is confusing, and can lead (did lead) to the confusion about (kbd "C-<") . (And I think "something you can pass to define-key " is itself misleading. This needs to be worded in some unambiguous way - in the doc, for example. It's possible to "pass" (kbd "C->") to define-key - it all depends on how one interprets "passing" something to a function.
|
|
Feb 25, 2022 at 22:32 | comment | added | Gilles 'SO- stop being evil' |
@Drew Yes, I don't understand why it's working. But it's not evaluating (kbd "<") as a function call: you can pass (foo "<") and it “works” too in that it's equivalent to "<".
|
|
Feb 25, 2022 at 22:18 | comment | added | Drew |
"What you're passing as the key is (kbd "<"), which is a 2-element list whose car is kbd. This is not a listed event type, so I would have expected an error." But the same applies to (kbd "<") , no? That too needs to be evaluated.
|
|
Feb 25, 2022 at 21:24 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 4.0 |