From 94ddb2f68bff53cebdb3a001bde2cdc9975eca33 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 6 Jun 2019 17:28:34 +0800 Subject: [PATCH] Use hooks instead of advices. --- doom-modeline-core.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doom-modeline-core.el b/doom-modeline-core.el index 6e16b50..4de9853 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -438,9 +438,9 @@ If the actual char height is larger, it respects the actual char height.") (add-hook 'window-configuration-change-hook #'doom-modeline-set-selected-window) (add-hook 'buffer-list-update-hook #'doom-modeline-set-selected-window) +(add-hook 'after-make-frame-functions #'doom-modeline-set-selected-window) +(add-hook 'delete-frame-functions #'doom-modeline-set-selected-window) (advice-add #'handle-switch-frame :after #'doom-modeline-set-selected-window) -(advice-add #'make-frame :after #'doom-modeline-set-selected-window) -(advice-add #'delete-frame :after #'doom-modeline-set-selected-window) (with-no-warnings (cond ((not (boundp 'after-focus-change-function)) (add-hook 'focus-in-hook #'doom-modeline-set-selected-window)