]> code.delx.au - gnu-emacs-elpa/commit
Closes #403: more uniform behaviour for `yas-use-menu'
authorJoao Tavora <joaotavora@gmail.com>
Fri, 14 Mar 2014 09:55:22 +0000 (09:55 +0000)
committerJoao Tavora <joaotavora@gmail.com>
Fri, 14 Mar 2014 09:55:22 +0000 (09:55 +0000)
commit8e7295b93460b7d389ecb65969fcedbee6495de8
treeb994f288518bbe38b8463753def59f1d74eaf045
parentb36a4f7449f61d22942fc188884f3314bb7fec35
Closes #403: more uniform behaviour for `yas-use-menu'

Suggested by Noam Postavsky, this uses the :visible arg to
`easy-menu-define' to hide the whole "YASnippet" menu according to the
run-time value of `yas-use-menu'. Previously, only the load-time value
was considered and some functions we're noops when `yas-use-menu' was
nil.

The per-mode snippet submenus are now always updated even if
`yas-use-menu' is nil, although they won't be shown until it becomes
non-nil.

* yasnippet.el (yas--minor-mode-menu): Use :visible arg and eval `yas-use-menu'
(yas--update-template): Always update the menu.
(yas--show-menu-p): Always return t if `yas-use-menu' is non-nil and not `abbreviate'
(yas-define-menu): Always define a menu.
(yas-use-menu): Update docstring.
yasnippet.el