diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 82fe6091c..a1b20649d 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3987,7 +3987,7 @@ agenda display, configure `org-agenda-finalize-hook'." p (string-to-char (match-string 2)) b (match-beginning 1) e (if (eq org-agenda-fontify-priorities 'cookies) - (match-end 1) + (1+ (match-end 2)) (point-at-eol)) ov (make-overlay b e)) (overlay-put diff --git a/lisp/org.el b/lisp/org.el index 3906a22b9..edfecb786 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5846,7 +5846,7 @@ If TAG is a number, get the corresponding match group." "Add the special priority faces." (while (re-search-forward org-priority-regexp limit t) (let ((beg (match-beginning 1)) - (end (match-end 1))) + (end (1+ (match-end 2)))) (add-face-text-property beg end (org-get-priority-face (string-to-char (match-string 2))))