Merge pull request #678 from ar1a/wakatime-interactive
Make +wakatime-init interactive
This commit is contained in:
commit
f74d595e17
1 changed files with 6 additions and 2 deletions
|
@ -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."))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue