summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-03-30 22:43:03 +0200
committerBastien Guerry <bzg@altern.org>2012-03-30 22:43:03 +0200
commitb46fa17a97ee050b5aeccffaa7323201fe491371 (patch)
tree5394d0a8a58e39753062fd3df97f77db93ead742
parent61aabd7f8525771d031d1ebe55f329caaff2b327 (diff)
downloadorg-mode-b46fa17a97ee050b5aeccffaa7323201fe491371.tar.gz
Fix global dynamic variables in org-clock.el.
Thanks to Martyn Jago for this patch.
-rw-r--r--lisp/org-clock.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index feca16d..b113302 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1691,7 +1691,7 @@ from the `before-change-functions' in the current buffer."
(remove-hook 'before-change-functions
'org-clock-remove-overlays 'local))))
-(defvar state) ;; dynamically scoped into this function
+(defvar org-clock-state) ;; dynamically scoped into this function
(defun org-clock-out-if-current ()
"Clock out if the current entry contains the running clock.
This is used to stop the clock after a TODO entry is marked DONE,
@@ -1700,9 +1700,9 @@ and is only done if the variable `org-clock-out-when-done' is not nil."
org-clock-out-when-done
(marker-buffer org-clock-marker)
(or (and (eq t org-clock-out-when-done)
- (member state org-done-keywords))
+ (member org-clock-state org-done-keywords))
(and (listp org-clock-out-when-done)
- (member state org-clock-out-when-done)))
+ (member org-clock-state org-clock-out-when-done)))
(equal (or (buffer-base-buffer (org-clocking-buffer))
(org-clocking-buffer))
(or (buffer-base-buffer (current-buffer))