소스 검색

Fix `org-get-repeat'

* lisp/org.el (org-get-repeat): Prevent false positive.
Nicolas Goaziou 8 년 전
부모
커밋
aef7eef0f9
1개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제
  1. 7 5
      lisp/org.el

+ 7 - 5
lisp/org.el

@@ -13199,11 +13199,13 @@ on INACTIVE-OK."
   (save-match-data
     (save-excursion
       (org-back-to-heading t)
-      (and (re-search-forward (if tagline
-				  (concat tagline "\\s-*" org-repeat-re)
-				org-repeat-re)
-			      (org-entry-end-position) t)
-	   (match-string-no-properties 1)))))
+      (let ((end (org-entry-end-position))
+	    (regexp (if tagline (concat tagline "\\s-*" org-repeat-re)
+		      org-repeat-re)))
+	(catch :repeat
+	  (while (re-search-forward regexp end t)
+	    (when (org-at-timestamp-p)
+	      (throw :repeat (match-string-no-properties 1)))))))))
 
 (defvar org-last-changed-timestamp)
 (defvar org-last-inserted-timestamp)