From e5a04e512f38a80054f9be7a1994291c7a268553 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 12 Jun 2017 00:54:57 +0200 Subject: [PATCH] core-ui: refactor echo-keystrokes hooks --- core/core-ui.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index d3c3bd341..d73a21b21 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -52,10 +52,12 @@ confirmation." (add-hook 'kill-emacs-query-functions #'doom-quit-p) ;; 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 -(add-hook! isearch-mode (setq echo-keystrokes 0)) -(add-hook! isearch-mode-end (setq echo-keystrokes 0.02)) +(add-hook 'isearch-mode-hook #'doom|disable-ui-keystrokes) +(add-hook 'isearch-mode-end-hook #'doom|enable-ui-keystrokes) ;; A minor mode for toggling the mode-line (defvar-local doom--modeline-format nil