summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2010-05-24 15:11:14 +0200
committerBastien Guerry <bzg@altern.org>2010-05-24 15:11:14 +0200
commit3685d6b49618a2d19bd7c472f81997b9640dd527 (patch)
tree170e1cb6a101eb638e281cdd6b0073a921c04497
parent70966091826ae2559d7859e452a169864546976b (diff)
downloadorg-mode-3685d6b49618a2d19bd7c472f81997b9640dd527.tar.gz
`org-timer-set-timer': fix bug about cancelling timer.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/org-timer.el3
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1fc20b7..41d18f0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-24 Bastien Guerry <bzg@altern.org>
+
+ * org-timer.el (org-timer-set-timer): Fix bug about cancelling
+ timers.
+
2010-05-21 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-emph-re): Document the match groups.
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 72e2c9e..de10280 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -338,7 +338,8 @@ VALUE can be `on', `off', or `pause'."
(y-or-n-p "Replace current timer? "))
(not org-timer-current-timer))
(progn
- (cancel-timer org-timer-current-timer)
+ (when org-timer-current-timer
+ (cancel-timer org-timer-current-timer))
(setq org-timer-current-timer
(run-with-timer
secs nil `(lambda ()