org-timer: Fix `org-timer-stop'

* lisp/org-timer.el (org-timer-stop): Do not modify
  `org-timer-current-timer', which is related to countdown timer,
  a different feature.
This commit is contained in:
Nicolas Goaziou 2014-12-02 11:47:18 +01:00
parent bbacea55f5
commit dcf64c7ee3
1 changed files with 2 additions and 3 deletions

View File

@ -156,14 +156,12 @@ With prefix arg STOP, stop it entirely."
(org-timer-set-mode-line 'pause)
(message "Timer paused at %s" (org-timer-value-string)))))
(defvar org-timer-current-timer nil)
(defun org-timer-stop ()
"Stop the relative timer."
(interactive)
(run-hooks 'org-timer-stop-hook)
(setq org-timer-start-time nil
org-timer-pause-time nil
org-timer-current-timer nil)
org-timer-pause-time nil)
(org-timer-set-mode-line 'off)
(message "Timer stopped"))
@ -349,6 +347,7 @@ VALUE can be `on', `off', or `pause'."
(concat " <" (substring (org-timer-value-string) 0 -1) ">"))
(force-mode-line-update)))
(defvar org-timer-current-timer nil)
(defun org-timer-cancel-timer ()
"Cancel the current timer."
(interactive)