So, to optimize emacs startup time, I prefer encapsualte of all mods within the hook or eval-after-load. So I understood python, cpp and latex, but stuck in nXhtml. I tried the following:
(eval-after-load "HTML-mode"
'(progn
(load-file "~/.emacs.d/plugins/nxhtml/autostart.el")
))
Which does not 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 nXhtml mode is not turned on (SGML and AC only), so the areas do not differ differently in my php sources, and the completion of autocomplete / bracket does not work.
The only way this works is to load it at startup.
Looking at the trace when nxhtml is loaded at startup, it says:
"majmodpri-apply-priority running running ... (done)"
, n html-mode-hook eval-after-load, :
"majmodpri-apply-priority-running running... MU: majmodpri-check majmodpri-apply-priority: buffer = index.php, html-mode, nil = > sgml-mode, nil majmodpri-apply-priority running... (done)"
?