diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2024-02-10 15:57:54 +0000 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2024-02-10 15:57:54 +0000 |
| commit | f4a158aafca00946f606d45d10872c1c5137a969 (patch) | |
| tree | 604608e08762cf1f179152974d7ec9b31f5d1239 | |
| parent | cb6427623160372b597def2f91a18bcade9e3157 (diff) | |
emacs: Switch to keymap-* for binding keys
See https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29#n3878
for more details.
| -rw-r--r-- | emacs/init.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/emacs/init.el b/emacs/init.el index 24ee3ee..02b17e0 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -42,8 +42,8 @@ (electric-indent-mode -1) (global-auto-revert-mode 1) -(global-set-key (kbd "C-c j") #'join-line) -(global-set-key (kbd "C-c q") #'electric-quote-local-mode) +(keymap-global-set "C-c j" #'join-line) +(keymap-global-set "C-c q" #'electric-quote-local-mode) (use-package marginalia :config (marginalia-mode 1) :ensure t) @@ -67,7 +67,7 @@ (my/with-add-hook 'ibuffer-mode-hook (ibuffer-switch-to-saved-filter-groups "default")) -(global-set-key (kbd "C-x C-b") #'ibuffer) +(keymap-global-set "C-x C-b" #'ibuffer) ;; Search and Completion Management @@ -95,10 +95,10 @@ ;; “Window” Management -(global-set-key (kbd "<C-tab>") #'other-window) -(global-set-key (kbd "<C-M-tab>") #'other-frame) -(global-set-key (kbd "C-c l") #'my/focus-frame) -(global-set-key (kbd "C-c f") #'toggle-frame-maximized) +(keymap-global-set "C-TAB" #'other-window) +(keymap-global-set "C-M-TAB" #'other-frame) +(keymap-global-set "C-c l" #'my/focus-frame) +(keymap-global-set "C-c f" #'toggle-frame-maximized) (windmove-default-keybindings 'super) @@ -130,7 +130,7 @@ (setopt clang-format-style "google") (my/with-add-hook 'c-initialization-hook - (local-set-key (kbd "C-c d") #'clang-format)) + (keymap-local-set "C-c d" #'clang-format)) (add-hook 'c-mode-common-hook #'google-set-c-style) (add-hook 'c++-mode-hook #'flycheck-mode) @@ -146,7 +146,7 @@ (my/with-add-hook 'dired-mode-hook (setq-local mouse-1-click-follows-link (- mouse-1-click-follows-link)) - (local-set-key [mouse-1] #'dired-find-file)) + (keymap-local-set "<mouse-1>" #'dired-find-file)) ;; Go |
