-
Notifications
You must be signed in to change notification settings - Fork 16
Home
LeoUfimtsev edited this page Apr 12, 2015
·
8 revisions
Welcome to the guide-key wiki!
Sometimes you have a deeper menu structure, but the name of a group of keys appears as a generic “Prefix Command”. But you would like to name the intermediate ‘command groups’. This can be done via `define-prefix-command`.
For example:
(define-prefix-command 'message-menu) (bind-key (kbd "<f2> t") 'message-menu) (bind-key (kbd "<f2> t 1") (defun my/message1 () (interactive) (message "Messag1"))) (bind-key (kbd "<f2> t 2") (defun my/message2 () (interactive) (message "Messag2")))
Now when you press f2, you will see [t] message-menu
Source: http://www.emacswiki.org/emacs/PrefixKey