mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix wakatime api key void-variable errors
Because the api-key was saved to the elisp cache without quotes, the key was read like a variable symbol. This is why we can't have nice things. Reported by @freddian
This commit is contained in:
@ -20,7 +20,7 @@ changes."
|
||||
(user-error "No api key was received."))
|
||||
(setq wakatime-api-key api-key)
|
||||
(with-temp-file +wakatime-api-file
|
||||
(princ `(setq wakatime-api-key ,api-key)
|
||||
(prin1 `(setq wakatime-api-key ,wakatime-api-key)
|
||||
(current-buffer)))
|
||||
(require 'wakatime-mode)
|
||||
(global-wakatime-mode +1)))
|
||||
@ -30,9 +30,8 @@ changes."
|
||||
"Initialize wakatime (if `wakatime-api-key' is set, otherwise no-op with a
|
||||
warning)."
|
||||
(interactive)
|
||||
(when (and (not (bound-and-true-p wakatime-api-key))
|
||||
(file-exists-p +wakatime-api-file))
|
||||
(load +wakatime-api-file nil t))
|
||||
(unless (bound-and-true-p wakatime-api-key)
|
||||
(ignore-errors (load +wakatime-api-file t t)))
|
||||
(if (bound-and-true-p wakatime-api-key)
|
||||
(global-wakatime-mode +1)
|
||||
(message "wakatime-mode isn't set up. Run `M-x +wakatime/start' to do so (only necessary once)."))
|
||||
|
Reference in New Issue
Block a user