emacs - Minor Mode Mode-Line Menu -
how make entry in mode-line popup minor mode menu when clicked?
for reference see discussion https://github.com/flycheck/flycheck/issues/365#issuecomment-38386558
it seems menu displayed on clicking mode-line
entry mode same menu displayed when 1 clicks on mode's entry in menu-bar, provided mode defines top level menu entry. simplest way define top level menu so
(easy-menu-define flycheck-menu flycheck-mode-map "flycheck menu" '("flycheck" ["check current buffer" flycheck-buffer t] ["clear errors in buffer" flycheck-clear t] ["compile current buffer" flycheck-compile t] "---" ["go next error" flycheck-next-error t] ["go previous error" flycheck-previous-error t] ["show errors" flycheck-list-errors t] ["google messages @ point" flycheck-google-messages t] "---" ["select syntax checker" flycheck-select-checker t] "---" ["describe syntax checker" flycheck-describe-checker t] ["read flycheck manual" flycheck-info t]))
this might not solution if not want introduce menu-bar item. looking @ function minor-mode-menu-from-indicator
in mouse.el
seems looks keybindings starting [menu-bar]
getting mode-line menu, might interesting you.
Comments
Post a Comment