So in order to optimize emacs startup time I prefer to encapsualte all mods within a hook or an eval-after-load. So I figured out python, cpp and latex but am stuck with nXhtml. I tried the following:
(eval-after-load "HTML-mode"
'(progn
(load-file "~/.emacs.d/plugins/nxhtml/autostart.el")
))
Which doesn't work at all.
The code :
(add-hook 'html-mode-hook (lambda()
(progn
(load-file "~/.emacs.d/plugins/nxhtml/autostart.el")
)))
loads some parts of nXhtml but the nXhtml mode is not on (only SGML and AC) so scopes aren't colored differently in my php sources or autocomplete/ bracket completion doesn't work.
The only way it works properly is if I let it load on startup.
Looking at the trace , when nxhtml is loaded during startup it says :
"majmodpri-apply-priorities running ... (done)"
However when the load is encapsulated by a n html-mode-hook or the eval-after-load the trace says:
"majmodpri-apply-priorities running ... MU:majmodpri-check changing majmodpri-apply-priorities: buffer=index.php, html-mode,nil => sgml-mode,nil majmodpri-apply-priorities running ... (done)"
Any ideas?