forked from mirrors/org-mode
org-colview: Do not remap faces repeatedly
* lisp/org-colview.el (org-columns--display-here): (org-columns-remove-overlays): Do not call `face-remap-add-relative' after it is already called. For large files, `face-remap-add-relative' can take more than 90% CPU time. Set `org-columns-header-line-remap' to nil when we remove the temporary remapping.
This commit is contained in:
parent
8d9ca0eac1
commit
f41ba23689
|
@ -377,7 +377,8 @@ This is needed to later remove this relative remapping.")
|
||||||
COLUMNS is an alist (SPEC VALUE DISPLAYED). Optional argument
|
COLUMNS is an alist (SPEC VALUE DISPLAYED). Optional argument
|
||||||
DATELINE is non-nil when the face used should be
|
DATELINE is non-nil when the face used should be
|
||||||
`org-agenda-column-dateline'."
|
`org-agenda-column-dateline'."
|
||||||
(when (ignore-errors (require 'face-remap))
|
(when (and (ignore-errors (require 'face-remap))
|
||||||
|
org-columns-header-line-remap)
|
||||||
(setq org-columns-header-line-remap
|
(setq org-columns-header-line-remap
|
||||||
(face-remap-add-relative 'header-line '(:inherit default))))
|
(face-remap-add-relative 'header-line '(:inherit default))))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
@ -514,7 +515,8 @@ for the duration of the command.")
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (and (fboundp 'face-remap-remove-relative)
|
(when (and (fboundp 'face-remap-remove-relative)
|
||||||
org-columns-header-line-remap)
|
org-columns-header-line-remap)
|
||||||
(face-remap-remove-relative org-columns-header-line-remap))
|
(face-remap-remove-relative org-columns-header-line-remap)
|
||||||
|
(setq org-columns-header-line-remap nil))
|
||||||
(when org-columns-overlays
|
(when org-columns-overlays
|
||||||
(when (local-variable-p 'org-previous-header-line-format)
|
(when (local-variable-p 'org-previous-header-line-format)
|
||||||
(setq header-line-format org-previous-header-line-format)
|
(setq header-line-format org-previous-header-line-format)
|
||||||
|
|
Loading…
Reference in New Issue