]> code.delx.au - gnu-emacs-elpa/commit
Activate extra and major modes first
authorNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 31 Oct 2015 19:54:33 +0000 (15:54 -0400)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Sun, 1 Nov 2015 23:35:52 +0000 (18:35 -0500)
commitcd05da61f9a6155f5ad3e284320daa6b5c73e011
treec1642994e58dced9e9444e4d27574aa06723f052
parentb8687bb0fe817a1eda657ff7b8511dc523ae9536
Activate extra and major modes first

This prevents snippets from a parent mode from overriding those of the
major-mode's (or yas--extra-modes).  Snippets of ancestor modes may
still override snippets of some other ancestor modes, but hopefully this
won't cause much trouble in practice.

See [1] and subsequent comments.

[1]: https://github.com/capitaomorte/yasnippet/issues/619#issuecomment-149127150

* yasnippet.el (yas--modes-to-activate): Reverse result, so that parents
  of yas--extra-modes and major are later in the list.
* yasnippet-tests.el (loading-with-cyclic-parenthood)
(extra-modes-parenthood): Test it.

Close #626.
yasnippet-tests.el
yasnippet.el