Rename doom-before-switch-*-hook hooks
+ doom-before-switch-buffer-hook => doom-exit-buffer-hook + doom-before-switch-window-hook => doom-exit-window-hook + doom-after-switch-buffer-hook => doom-enter-buffer-hook + doom-after-switch-window-hook => doom-enter-window-hook Shorter, easier-to-type names that better describe their intended purpose. The old names are still usable, but deprecated.
This commit is contained in:
parent
1dc43f9770
commit
81ffed520b
6 changed files with 29 additions and 25 deletions
|
@ -44,14 +44,14 @@ warning)."
|
|||
(make-directory +wakatime-home t)))
|
||||
(global-wakatime-mode +1))
|
||||
;;
|
||||
(remove-hook 'doom-before-switch-buffer-hook #'+wakatime|autostart)
|
||||
(remove-hook 'doom-exit-buffer-hook #'+wakatime|autostart)
|
||||
(advice-remove 'after-find-file #'+wakatime|autostart))
|
||||
|
||||
;;;###autoload
|
||||
(defun +wakatime|delayed-autostart (&rest _)
|
||||
"Lazily initialize `wakatime-mode' until the next time you switch buffers or
|
||||
open a file."
|
||||
(add-hook 'doom-before-switch-buffer-hook #'+wakatime|autostart)
|
||||
(add-hook 'doom-exit-buffer-hook #'+wakatime|autostart)
|
||||
;; this is necessary in case the user opens emacs with file arguments
|
||||
(advice-add 'after-find-file :before #'+wakatime|autostart))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue