Emacs Keys: Keybinding Functions, Emacs 29 Change
Emacs 29 keybinding function change
Emacs 29 (date 2023) added many new functions for keybinding.
- The old functions are still supported.
- The new functions are better.
emacs 29 | emacs 28 |
---|---|
keymap-set | define-key |
keymap-global-set | global-set-key |
keymap-local-set | local-set-key |
keymap-global-unset | global-unset-key |
keymap-local-unset | local-unset-key |
keymap-substitute | substitute-key-definition |
keymap-set-after | define-key-after |
keymap-lookup | lookup-key and key-binding |
keymap-local-lookup | local-key-binding |
keymap-global-lookup | global-key-binding |
new functions for creating keymaps:
define-keymap
defvar-keymap
〔see Elisp: Create Keymap (keybinding)〕
Example
;; example ;; emacs 29 syntax (keymap-global-set "C-t" #'whitespace-mode) ;; emacs 28 or before (global-set-key (kbd "C-t") #'whitespace-mode)
Emacs, Change Keys
- Emacs Keys: Define Key
- Emacs Keys: Keybinding Functions, Emacs 29 Change
- Emacs Keys: Syntax
- Emacs Keys: Good and Bad Key Choices
- Emacs Keys: Swap CapsLock Control
- Emacs Keys: Meta Key
- Emacs Keys: Change Major Mode Keys
- Emacs Keys: Change Minor Mode Keys
- Emacs Keys: Minor Modes Key Priority
- Emacs Keys: Change Minibuffer Keys
- Elisp: Create Keymap (keybinding)