From 865bd6b8f23517927ec61bad46a6c2beac9c1392 Mon Sep 17 00:00:00 2001 From: Evgeni Kolev Date: Fri, 9 Nov 2018 14:43:27 +0200 Subject: [PATCH] Don't try to call anzu functions if anzu isn't installed --- doom-modeline.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doom-modeline.el b/doom-modeline.el index 40cc5fe..d8f8f99 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -379,9 +379,10 @@ active.") ;; anzu--last-isearch-string anzu--overflow-p)) ;; Ensure anzu state is cleared when searches & iedit are done -(add-hook 'isearch-mode-end-hook #'anzu--reset-status t) -(add-hook 'iedit-mode-end-hook #'anzu--reset-status) -(advice-add #'evil-force-normal-state :after #'anzu--reset-status) +(with-eval-after-load 'anzu + (add-hook 'isearch-mode-end-hook #'anzu--reset-status t) + (add-hook 'iedit-mode-end-hook #'anzu--reset-status) + (advice-add #'evil-force-normal-state :after #'anzu--reset-status)) ;; Keep `doom-modeline-current-window' up-to-date (defvar doom-modeline-current-window (frame-selected-window))