1

How to remove the YASnippet category from the Emacs menu bar?

deprecated
  • 5,142
  • 3
  • 41
  • 62

2 Answers2

2

M-x customize-variable RET yas-use-menu

A value of nil should do the job

juanleon
  • 9,220
  • 30
  • 41
  • It obviously sounds like a correct answer (variable's description sounds reasonable as well: `Display a YASnippet menu in the menu bar`) but it just isn't working... – deprecated Sep 02 '13 at 07:49
  • @vemv, hmmm, it seems like a bug in yas. If I do `(setq-default yas-use-menu nil)` then `yas-global-mode` fails because `yas-reload-all` assumes a menu exists despite the customization. My advice would be to report this bug to yas maintainer. – juanleon Sep 02 '13 at 08:45
1

Add these line after loading Yasnippet

(setq yas-use-menu nil)
(yas-reload-all)
Tony
  • 398
  • 2
  • 11
  • So how about set this variable after yasnippet initial? You can try this code after your yasnippet has been loaded. ` (setq yas-use-menu nil) (yas-reload-all) ` – Tony Sep 03 '13 at 02:55
  • 1
    I have edited the answer, please try that. It's working fine on my machine. – Tony Sep 03 '13 at 02:58
  • Still not working, unfortunately :( I tried it in the following sequence (among others): `(setq yas-use-menu nil) (require 'yasnippet)(yas-reload-all) (menu-bar-mode) (yas-global-mode 1)` – deprecated Sep 03 '13 at 07:31
  • 1
    try this sequence : (require 'yasnippet) (setq yas-use-menu nil) (yas-reload-all) – Tony Sep 03 '13 at 09:40