Add doom-{after,before}-switch-window-hook hooks

This commit is contained in:
Henrik Lissner 2018-03-12 13:28:56 -04:00
parent 00a9a08afb
commit fbb9947c7e
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -280,6 +280,21 @@ DEFAULT is non-nil, set the default mode-line for all buffers."
(add-hook 'server-visit-hook 'server-remove-kill-buffer-hook)
;;
;; Custom hooks
;;
(defun doom*after-switch-window-hooks (&rest _)
(run-hooks 'doom-after-switch-window-hook))
(defun doom*before-switch-window-hooks (&rest _)
(run-hooks 'doom-before-switch-window-hook))
(advice-add #'select-frame :before #'doom*before-switch-window-hooks)
(advice-add #'select-frame :after #'doom*after-switch-window-hooks)
(advice-add #'select-window :before #'doom*before-switch-window-hooks)
(advice-add #'select-window :after #'doom*after-switch-window-hooks)
;;
;; Line numbers
;;