2646Mode dependent tools menu?
- May 12, 2011For the Go mode, I create a gofmt macro. Go ships with a formatting program called gofmt. When contributing to just about any project they expect the code to be properly formatted. For the most part the indentation does that but gofmt may format some areas that the go mode does not, for instance variable assignments and import statments. They are aligned. Anyway, I added:
set-variable .fhook-go.command-flag "|t|"
set-variable .fhook-go.command-name "|gofmt|"
set-variable .fhook-go.command-nbind "||"
set-variable .fhook-go.command-kbind "||"
set-variable .fhook-go.command-desc "|Go Format|"
to my Go mode. When doing so, the normal tool menu disappeared, it use to contain items such as Start Comment, Comment Out Line, ..., List Items, ... ... Now all it contains is "View Help Page" and "Insert a Nortmal Tab". It does not even incude my "Go Format" item.
What am I doing wrong? I committed my code to my github repo, but the command stuff is commented out as to not break the existing tool menu. https://github.com/jcowgar/dotmicroemacs/blob/master/hkgo.emf
- Next post in topic >>