Uwe Brauer <[email protected]> writes: > > I just wanted do debug this issue but with the Emacs copy as of right > > now (commit 4a703c73305211c780307e3654969ac1a20fb229) I can't reproduce > > it anymore. With the above add-hook, symbols are instantly prettified > > when opening some tex file. > > > So it might be some temporary hiccup in emacs. Can you confirm that? > > [snip] > > This worked but the hook problem continues.
Indeed, now I can also reproduce it. I think the problem is that font-latex.el adds `font-latex-setup' to `latex-mode-hook' for users of the standard Emacs `latex-mode' that want to use font-latex. The problem is that `latex-mode-hook' is also run when using AUCTeX LaTeX mode, and `font-latex-setup' completely re-initializes font-lock rules and throws prettify-symbol's rule out. I see several ways to fix this: 1. Remove `font-latex-setup' from `latex-mode-hook' in `VirTeX-common-initialization'. I mean, then we know that the user uses AUCTeX's modes and not the built-in ones. 2. Don't add `font-latex-setup' to `latex-mode-hook' when loading font-latex.el in the first place. IMO, fix 2 is better because modifying stuff just by loading a lisp file is bad practice anyway. However, it will break for users of the Emacs built-in (la)tex-mode who use font-latex. They'd have to place `font-latex-setup' in their `latex-mode-hook' on their own then. Bye, Tassilo _______________________________________________ auctex-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex-devel
