Browse Source

Fix 80fc5ad

Thanks to Yasushi SHOJI for reporting this.
Bastien Guerry 4 years ago
parent
commit
2c7ffbe4b2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lisp/org.el

+ 5 - 1
lisp/org.el

@@ -12715,6 +12715,8 @@ statistics everywhere."
 	    	(setq kwd (and (or recursive (= l1 ltoggle))
 	    		       (match-string 2)))
 	    	(if (or (eq org-provide-todo-statistics 'all-headlines)
+			(and (eq org-provide-todo-statistics t)
+			     (or (member kwd org-done-keywords)))
 	    		(and (listp org-provide-todo-statistics)
 			     (stringp (car org-provide-todo-statistics))
 	    		     (or (member kwd org-provide-todo-statistics)
@@ -12727,7 +12729,9 @@ statistics everywhere."
 	    	    (setq cnt-all (1+ cnt-all))
 	    	  (if (eq org-provide-todo-statistics t)
 	    	      (and kwd (setq cnt-all (1+ cnt-all)))))
-	    	(when (or (and (listp org-provide-todo-statistics)
+	    	(when (or (and (eq org-provide-todo-statistics t)
+			       (member kwd org-done-keywords))
+			  (and (listp org-provide-todo-statistics)
 			       (listp (car org-provide-todo-statistics))
 			       (member kwd org-done-keywords)
 			       (member kwd (cadr org-provide-todo-statistics)))