From 663bd1e36f0fb7a2f6f120aade13950e49b3cfc0 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 7 Apr 2022 09:27:45 -0400 Subject: [PATCH] Ensure which-key loads at startup --- emacs/.emacs.d/config/init-keybindings.el | 3 +-- emacs/.emacs.d/config/init-windows.el | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/emacs/.emacs.d/config/init-keybindings.el b/emacs/.emacs.d/config/init-keybindings.el index c839780..bc0fb72 100644 --- a/emacs/.emacs.d/config/init-keybindings.el +++ b/emacs/.emacs.d/config/init-keybindings.el @@ -11,8 +11,7 @@ :prefix-map 'leader-map)) (use-package which-key - :config - (which-key-mode)) + :hook (after-init . which-key-mode)) (leader-def-key "SPC" #'execute-extended-command) diff --git a/emacs/.emacs.d/config/init-windows.el b/emacs/.emacs.d/config/init-windows.el index 1946fb2..e577f18 100644 --- a/emacs/.emacs.d/config/init-windows.el +++ b/emacs/.emacs.d/config/init-windows.el @@ -32,8 +32,10 @@ "C-r" #'winner-redo) ;; Condense the which-key display for window selection bindings -(push '(("\\(.*\\) 0" . "select-window-0") . ("\\1 0..9" . "window 0..9")) - which-key-replacement-alist) -(push '((nil . "select-window-[1-9]") . t) which-key-replacement-alist) +(with-eval-after-load 'which-key + (push '(("\\(.*\\) 0" . "select-window-0") . ("\\1 0..9" . "window 0..9")) + which-key-replacement-alist) + (push '((nil . "select-window-[1-9]") . t) which-key-replacement-alist)) + (provide 'init-windows)