Merge pull request #671 from ar1a/wakatime-fixed

Fix wakatime breaking emacs if no api-key set
This commit is contained in:
Henrik Lissner 2018-06-10 22:27:33 +02:00 committed by GitHub
commit 01c63481f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@
(defun +wakatime-init ()
"Initialize wakatime (if `wakatime-api-key' is set, otherwise no-op with a
warning)."
(if wakatime-api-key
(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))