Skip to content

Commit ba6cf46

Browse files
committed
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.
1 parent 1f16443 commit ba6cf46

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lisp/org.el

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5845,13 +5845,14 @@ If TAG is a number, get the corresponding match group."
58455845
(defun org-font-lock-add-priority-faces (limit)
58465846
"Add the special priority faces."
58475847
(while (re-search-forward org-priority-regexp limit t)
5848-
(add-face-text-property
5849-
(match-beginning 1)
5850-
(match-end 1)
5851-
(org-get-priority-face (string-to-char (match-string 2))))
5852-
(add-text-properties
5853-
(match-beginning 1) (match-end 1)
5854-
(list 'font-lock-fontified t))))
5848+
(let ((beg (match-beginning 1))
5849+
(end (match-end 1)))
5850+
(add-face-text-property
5851+
beg end
5852+
(org-get-priority-face (string-to-char (match-string 2))))
5853+
(add-text-properties
5854+
beg end
5855+
(list 'font-lock-fontified t)))))
58555856

58565857
(defun org-font-lock-add-tag-faces (limit)
58575858
"Add the special tag faces."

0 commit comments

Comments
 (0)