mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Merge pull request #678 from ar1a/wakatime-interactive
Make +wakatime-init interactive
This commit is contained in:
@ -1,12 +1,16 @@
|
||||
;;; tools/wakatime/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(add-hook 'doom-after-switch-buffer-hook #'+wakatime-init)
|
||||
(add-hook 'doom-after-switch-buffer-hook #'+wakatime|autostart)
|
||||
|
||||
;;;###autoload
|
||||
(defun +wakatime-init ()
|
||||
(defalias '+wakatime/start '+wakatime|autostart)
|
||||
|
||||
;;;###autoload
|
||||
(defun +wakatime|autostart ()
|
||||
"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."))
|
||||
|
Reference in New Issue
Block a user