Skip to content

Commit

Permalink
FIX/circadian.el: proper canceling of previous timer
Browse files Browse the repository at this point in the history
  • Loading branch information
guidoschmidt committed Apr 30, 2024
1 parent 433478b commit c6ff7ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions circadian.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
(progn
(mapc #'disable-theme custom-enabled-themes)
(load-theme theme t)
(if (not (equal nil circadian-next-timer))
(cancel-timer circadian-next-timer))
(setq circadian-next-timer nil)
(if circadian-verbose
(message "[circadian.el] → Enabled %s theme @ %s"
Expand Down Expand Up @@ -166,8 +168,6 @@ set and and sort the final list by time."

(defun circadian-schedule()
"Schedule the next timer for circadian."
(if (not (equal nil circadian-next-timer))
(cancel-timer circadian-next-timer))
(random (format-time-string "%H:%M" (decode-time)))
(let* ((themes (circadian-themes-parse))
(now (circadian-now-time))
Expand Down

0 comments on commit c6ff7ce

Please sign in to comment.