Parcourir la source

Merge branch 'maint'

Nicolas Goaziou il y a 8 ans
Parent
commit
adfc9fb4dd
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5 3
      lisp/org.el

+ 5 - 3
lisp/org.el

@@ -13230,9 +13230,11 @@ This function is run automatically after each state change to a DONE state."
       (when (eq org-log-repeat t) (setq org-log-repeat 'state))
       (let ((to-state (or (org-entry-get nil "REPEAT_TO_STATE" 'selective)
 			  org-todo-repeat-to-state)))
-	(unless (and to-state (member to-state org-todo-keywords-1))
-	  (setq to-state (if (eq interpret 'type) org-last-state head)))
-	(org-todo to-state))
+	(org-todo (cond ((and to-state (member to-state org-todo-keywords-1))
+			 to-state)
+			((eq interpret 'type) org-last-state)
+			(head)
+			(t 'none))))
       (when (or org-log-repeat (org-entry-get nil "CLOCK"))
 	(org-entry-put nil "LAST_REPEAT" (format-time-string
 					  (org-time-stamp-format t t)