summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2014-12-02 11:28:15 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2014-12-02 11:28:15 +0100
commitbbacea55f5a85635302c4f5c0773634899a9786a (patch)
treea7fbc5586a24aa08c52729a3c429b9c97120538e
parent9aa58fa8529b349d1debd0ced19307b0af3be3be (diff)
downloadorg-mode-bbacea55f5a85635302c4f5c0773634899a9786a.tar.gz
org-timer: Fix "No running timer" error
* lisp/org-timer.el (org-timer-stop): Do not look after `org-timer-current-timer', which is a variable related to countdown timer, whereas the function is related to relative timer. Reported-by: Randy Smith <perlstalker@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/93081>
-rw-r--r--lisp/org-timer.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index f44b1cf..bcc3e1c 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -160,14 +160,12 @@ With prefix arg STOP, stop it entirely."
(defun org-timer-stop ()
"Stop the relative timer."
(interactive)
- (if (not org-timer-current-timer)
- (message "No running timer")
- (run-hooks 'org-timer-stop-hook)
- (setq org-timer-start-time nil
- org-timer-pause-time nil
- org-timer-current-timer nil)
- (org-timer-set-mode-line 'off)
- (message "Timer stopped")))
+ (run-hooks 'org-timer-stop-hook)
+ (setq org-timer-start-time nil
+ org-timer-pause-time nil
+ org-timer-current-timer nil)
+ (org-timer-set-mode-line 'off)
+ (message "Timer stopped"))
;;;###autoload
(defun org-timer (&optional restart no-insert-p)