[base] Fix void dired-mode-map

problem:
the attempt to hide the dired buffer, which-key entry:
r -> evil-mc

caused a void dired-mode-map message to appear on startup,
in the spacemacs-base distribution.

solution:
hide the which-key entry after dired loads.
This commit is contained in:
duianto 2021-02-04 19:50:54 +01:00
parent a7e8bd7e65
commit e8c84d4b37

View file

@ -124,9 +124,10 @@ If not in such a search box, fall back on `Custom-newline'."
(defun spacemacs/dired-remove-evil-mc-gr-which-key-entry ()
;; Remove inherited bindings from evil-mc
;; do this after the config to make sure the keymap is available
(which-key-add-keymap-based-replacements dired-mode-map
"<normal-state> g r" nil
"<visual-state> g r" nil))
(with-eval-after-load 'dired
(which-key-add-keymap-based-replacements dired-mode-map
"<normal-state> g r" nil
"<visual-state> g r" nil)))
(defun spacemacs/indent-region-or-buffer ()
"Indent a region if selected, otherwise the whole buffer."