org-columns--display-here: Avoid calling `face-remap-add-relative' when possible

* lisp/org-colview.el (org-columns--display-here): Do not call
`face-remap-add-relative' multiple times in the same buffer.
This commit is contained in:
Ihor Radchenko 2024-02-11 16:24:56 +01:00
parent 01a074d0b5
commit 2a999b298f
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 3 additions and 2 deletions

View File

@ -370,8 +370,9 @@ This is needed to later remove this relative remapping.")
COLUMNS is an alist (SPEC VALUE DISPLAYED). Optional argument
DATELINE is non-nil when the face used should be
`org-agenda-column-dateline'."
(when (and (ignore-errors (require 'face-remap))
org-columns-header-line-remap)
(when (and (not org-columns-header-line-remap)
(or (fboundp 'face-remap-add-relative)
(ignore-errors (require 'face-remap))))
(setq org-columns-header-line-remap
(face-remap-add-relative 'header-line '(:inherit default))))
(save-excursion