define-key
的文档里说:
(define-key KEYMAP KEY DEF)
…
DEF is anything that can be a key’s definition:
…
a cons (STRING . DEFN), meaning that DEFN is the definition (DEFN should be a valid definition in its own right),
那个STRING
是干啥用的?有人知道吗?
define-key
的文档里说:
(define-key KEYMAP KEY DEF)
…
DEF is anything that can be a key’s definition:
…
a cons (STRING . DEFN), meaning that DEFN is the definition (DEFN should be a valid definition in its own right),
那个STRING
是干啥用的?有人知道吗?
推測確认是用在图形界面菜單的文本上,因為 Emacs 的图形菜單也是个 keymap。
https://whispering-beach-14031.herokuapp.com/make-sparse-keymap
The optional arg STRING supplies a menu name for the keymap in case you use it as a menu with ‘x-popup-menu’.
(type item-name . binding)
This specifies a binding which is also a simple menu item that displays as item-name in the menu. See Simple Menu Items.