core-ui: refactor echo-keystrokes hooks
This commit is contained in:
parent
38f9e4b0a6
commit
e5a04e512f
1 changed files with 5 additions and 3 deletions
|
@ -52,10 +52,12 @@ confirmation."
|
||||||
(add-hook 'kill-emacs-query-functions #'doom-quit-p)
|
(add-hook 'kill-emacs-query-functions #'doom-quit-p)
|
||||||
|
|
||||||
;; show typed keystrokes in minibuffer
|
;; show typed keystrokes in minibuffer
|
||||||
(setq echo-keystrokes 0.02)
|
(defun doom|enable-ui-keystrokes () (setq echo-keystrokes 0.02))
|
||||||
|
(defun doom|disable-ui-keystrokes () (setq echo-keystrokes 0))
|
||||||
|
(doom|enable-ui-keystrokes)
|
||||||
;; ...but hide them while isearch is active
|
;; ...but hide them while isearch is active
|
||||||
(add-hook! isearch-mode (setq echo-keystrokes 0))
|
(add-hook 'isearch-mode-hook #'doom|disable-ui-keystrokes)
|
||||||
(add-hook! isearch-mode-end (setq echo-keystrokes 0.02))
|
(add-hook 'isearch-mode-end-hook #'doom|enable-ui-keystrokes)
|
||||||
|
|
||||||
;; A minor mode for toggling the mode-line
|
;; A minor mode for toggling the mode-line
|
||||||
(defvar-local doom--modeline-format nil
|
(defvar-local doom--modeline-format nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue