doomemacs/modules/tools/wakatime/autoload.el
Aria Edmonds b9a179eeed Make +wakatime-init interactive
Sometimes it doesn't prompt to decrypt gpg, etc etc. Regardless, I think
this should be interactive so it's easily re-initialized
2018-06-11 12:33:04 +10:00

15 lines
488 B
EmacsLisp

;;; tools/wakatime/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(add-hook 'doom-after-switch-buffer-hook #'+wakatime-init)
;;;###autoload
(defun +wakatime-init ()
"Initialize wakatime (if `wakatime-api-key' is set, otherwise no-op with a
warning)."
(interactive)
(if (boundp 'wakatime-api-key)
(global-wakatime-mode +1)
(message "No `wakatime-api-key' set! wakaktime-mode will stay disabled."))
(remove-hook 'doom-after-switch-buffer-hook #'+wakatime-init))