After a fresh install of Emacs (GNU Emacs 25.1.1 (i686-w64-mingw32) of 2016-09-18)
and AUCTeX (last version from ELPA) on Windows Vista, when I open a TeX file, Emacs takes an extremely long time to load the file (>2minutes).
In the minibuffer I see a message telling Applying style hooks...
; the delay starts exactly when I see this message.
After this delay, when I open the message buffer I see something like this:
Applying style hooks...
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/geometry.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amssymb.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsmath.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amstext.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsbsy.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsopn.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsthm.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/pdfsync.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/epigraph.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/multicol.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/makeidx.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/fancyhdr.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/footmisc.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/relsize.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/bm.elc...done
Applying style hooks... done
(Incidentally, the base names of the *.elc
files are the names the packages I use in my TeX file).
With Emacs 24.5 I didn't have this problem.
Any idea how to solve this issue? How to disable the loading of these style hooks?
If I open an empty TeX file, this delay is significantly reduced. If I run emacs without my init file, this delay disappears.
Edit: Thank you for your comments.
After your suggestions, I bisected my init file and I localized the code responsible for this delay. That was (setq TeX-parse-self t)
.