浏览代码

(org-resolve-clocks): Changed meaning of an argument

John Wiegley 15 年之前
父节点
当前提交
99afb931b2
共有 2 个文件被更改,包括 7 次插入4 次删除
  1. 3 0
      lisp/ChangeLog
  2. 4 4
      lisp/org-clock.el

+ 3 - 0
lisp/ChangeLog

@@ -13,6 +13,9 @@
 	(org-clock-resolve-expert): New customization variable.
 	(org-find-open-clocks): Fixed a bug that caused discovered
 	clocks not to match up with the currently active clock.
+	(org-resolve-clocks): Changed the argument
+	`also-non-dangling-p' to `only-dangling-p', since due to a bug
+	this was the default behavior all along.
 
 2010-05-15  Carsten Dominik  <carsten.dominik@gmail.com>
 

+ 4 - 4
lisp/org-clock.el

@@ -832,10 +832,10 @@ to be CLOCKED OUT.")))
 	    (not (memq ch '(?K ?G ?S ?C))))
        fail-quietly)))))
 
-(defun org-resolve-clocks (&optional also-non-dangling-p prompt-fn last-valid)
+(defun org-resolve-clocks (&optional only-dangling-p prompt-fn last-valid)
   "Resolve all currently open org-mode clocks.
-If `also-non-dangling-p' is non-nil, also ask to resolve
-non-dangling (i.e., currently open and valid) clocks."
+If `only-dangling-p' is non-nil, only ask to resolve dangling
+\(i.e., not currently open and valid) clocks."
   (interactive "P")
   (unless org-clock-resolving-clocks
     (let ((org-clock-resolving-clocks t))
@@ -844,7 +844,7 @@ non-dangling (i.e., currently open and valid) clocks."
 	  (dolist (clock clocks)
 	    (let ((dangling (or (not (org-clock-is-active))
 				(/= (car clock) org-clock-marker))))
-	      (unless (and (not dangling) (not also-non-dangling-p))
+	      (if (or (not only-dangling-p) dangling)
 		(org-clock-resolve
 		 clock
 		 (or prompt-fn