]> code.delx.au - gnu-emacs-elpa/commit
Extra measures to prevent premature yas-minor-mode
authorNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 14 May 2016 11:18:38 +0000 (07:18 -0400)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 14 May 2016 11:18:38 +0000 (07:18 -0400)
commit0d79e6988ec371279fc1c23733c7371bd21927ee
treed668859c970c2193104c0ae70f771decf73697fa
parent1b8f5b7a72c13d1daadc8af2ca6a27403830146d
Extra measures to prevent premature yas-minor-mode

The user's hooks may try to enable yas-minor-mode before yasnippet.el
has finished loading.  In [1], we catch and ignore the errors arising
from this, but it's better if we can avoid hitting the error in the
first place.

This means we have 3 separate measures to avoid the problem, but since
this bug can leave Emacs unusable due to a failing post-command-hook,
a bit of redundant safety is not a bad thing.

* yasnippet.el (yas-minor-mode): Only turn on if yasnippet is fully
loaded.
(yas--font-lock-keywords): Disable user hooks.

[1]: "Avoid potential problems with user's hooks"
4c6064ce1aff07fe4481b5e2d987c8a7f044c207
yasnippet.el