Minor refactor, across the board

Do you see the board? Now look at the other side. That's how far this
refactor extends.

Yes.
This commit is contained in:
Henrik Lissner 2018-06-18 15:02:24 +02:00
parent f6c7c13634
commit ca2c8b5a45
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
10 changed files with 31 additions and 29 deletions

View file

@ -55,17 +55,18 @@
(add-hook 'window-configuration-change-hook #'+doom-modeline|set-selected-window)
(add-hook 'doom-after-switch-window-hook #'+doom-modeline|set-selected-window)
(if (not (boundp 'after-focus-change-function))
(progn
(add-hook 'focus-in-hook #'+doom-modeline|set-selected-window)
(add-hook 'focus-out-hook #'+doom-modeline|unset-selected-window))
(defun +doom-modeline|refresh-frame ()
(setq +doom-modeline-current-window nil)
(cl-loop for frame in (frame-list)
if (eq (frame-focus-state frame) t)
return (setq +doom-modeline-current-window (frame-selected-window frame)))
(force-mode-line-update))
(add-function :after after-focus-change-function #'+doom-modeline|refresh-frame))
(with-no-warnings
(if (not (boundp 'after-focus-change-function))
(progn
(add-hook 'focus-in-hook #'+doom-modeline|set-selected-window)
(add-hook 'focus-out-hook #'+doom-modeline|unset-selected-window))
(defun +doom-modeline|refresh-frame ()
(setq +doom-modeline-current-window nil)
(cl-loop for frame in (frame-list)
if (eq (frame-focus-state frame) t)
return (setq +doom-modeline-current-window (frame-selected-window frame)))
(force-mode-line-update))
(add-function :after after-focus-change-function #'+doom-modeline|refresh-frame)))
;;