org.el: Avoid repeated calls in org-font-lock-add-priority-faces

* lisp/org.el (org-font-lock-add-priority-faces): Let-bind bounds to
avoid repeated calls.

This will also make the conflict resolution in the next merge of maint
clearer.
This commit is contained in:
Kyle Meyer 2020-10-11 02:05:27 -04:00
parent 1f1644396b
commit ba6cf4645f
1 changed files with 8 additions and 7 deletions

View File

@ -5845,13 +5845,14 @@ If TAG is a number, get the corresponding match group."
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward org-priority-regexp limit t)
(let ((beg (match-beginning 1))
(end (match-end 1)))
(add-face-text-property
(match-beginning 1)
(match-end 1)
beg end
(org-get-priority-face (string-to-char (match-string 2))))
(add-text-properties
(match-beginning 1) (match-end 1)
(list 'font-lock-fontified t))))
beg end
(list 'font-lock-fontified t)))))
(defun org-font-lock-add-tag-faces (limit)
"Add the special tag faces."