diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-05-18 19:54:38 -0400 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2021-05-19 14:08:50 +0200 |
commit | 1a5a326f106fa34b07b737c769308cbdfaeeb94d (patch) | |
tree | da1d28221f3a648d596f5a8d883b74a2ded84366 | |
parent | 71c40314f571964dc5bacdccfcb71bdb7221ef05 (diff) | |
download | org-mode-1a5a326f106fa34b07b737c769308cbdfaeeb94d.tar.gz |
* lisp/org-timer.el (org-timer--run-countdown-timer): Use closures
-rw-r--r-- | lisp/org-timer.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 60c6fa6..67b8c46 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -366,7 +366,7 @@ VALUE can be `on', `off', or `paused'." (setq org-timer-mode-line-timer nil)) (when org-timer-display (setq org-timer-mode-line-timer - (run-with-timer 1 1 'org-timer-update-mode-line)))))) + (run-with-timer 1 1 #'org-timer-update-mode-line)))))) (defun org-timer-update-mode-line () "Update the timer time in the mode line." @@ -456,14 +456,15 @@ using three `C-u' prefix arguments." "Start countdown timer that will last SECS. TITLE will be appended to the notification message displayed when time is up." - (let ((msg (format "%s: time out" title))) + (let ((msg (format "%s: time out" title)) + (sound org-clock-sound)) (run-with-timer - secs nil `(lambda () - (setq org-timer-countdown-timer nil - org-timer-start-time nil) - (org-notify ,msg ,org-clock-sound) - (org-timer-set-mode-line 'off) - (run-hooks 'org-timer-done-hook))))) + secs nil (lambda () + (setq org-timer-countdown-timer nil + org-timer-start-time nil) + (org-notify msg sound) + (org-timer-set-mode-line 'off) + (run-hooks 'org-timer-done-hook))))) (defun org-timer--get-timer-title () "Construct timer title. |