소스 검색

lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo'

* lisp/org-agenda.el (org-agenda-highlight-todo): Skip formatting
the to-do keyword when `org-agenda-todo-keyword-format' is the
empty string.

TINYCHANGE
Samim Pezeshki 3 년 전
부모
커밋
847e332301
1개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 6
      lisp/org-agenda.el

+ 7 - 6
lisp/org-agenda.el

@@ -7180,12 +7180,13 @@ The optional argument TYPE tells the agenda type."
 		  (concat
 		   (substring x 0 (match-end 1))
                    (unless (string= org-agenda-todo-keyword-format "")
-		     (format org-agenda-todo-keyword-format
-			     (match-string 2 x)))
-                   ;; Remove `display' property as the icon could leak
-		   ;; on the white space.
-		   (org-add-props " " (org-plist-delete (text-properties-at 0 x)
-                                                        'display))
+                     (format org-agenda-todo-keyword-format
+                             (match-string 2 x)))
+                   (unless (string= org-agenda-todo-keyword-format "")
+                     ;; Remove `display' property as the icon could leak
+                     ;; on the white space.
+                     (org-add-props " " (org-plist-delete (text-properties-at 0 x)
+                                                          'display)))
                    (substring x (match-end 3)))))))
       x)))