mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(latex): run AUCTeX folding after font locking
This guarantees that `TeX-fold-buffer` is run after the style hooks and not before. Otherwise, it looks like they may reset/erase font-lock stuff you have set up.
This commit is contained in:
committed by
Henrik Lissner
parent
7b07c620e7
commit
c247f9aabd
@ -115,9 +115,11 @@ If no viewers are found, `latex-preview-pane' is used.")
|
||||
|
||||
(use-package! tex-fold
|
||||
:when (featurep! +fold)
|
||||
:hook (TeX-mode . TeX-fold-buffer)
|
||||
:hook (TeX-mode . +latex-TeX-fold-buffer-h)
|
||||
:hook (TeX-mode . TeX-fold-mode)
|
||||
:config
|
||||
(defun +latex-TeX-fold-buffer-h ()
|
||||
(run-with-idle-timer 0 nil 'TeX-fold-buffer))
|
||||
;; Fold after all auctex macro insertions
|
||||
(advice-add #'TeX-insert-macro :after #'+latex-fold-last-macro-a)
|
||||
;; Fold after cdlatex macro insertions
|
||||
|
Reference in New Issue
Block a user