help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu on minor mode lighter


From: Michael Heerdegen
Subject: Re: Menu on minor mode lighter
Date: Fri, 01 Aug 2014 19:18:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Sebastian Wiesner <address@hidden> writes:

> how can I add a menu to the mode line lighter of a minor mode, similar
> to the menu that appears when you click on the mode line lighter of
> Dired?  However, the menu should *not* appear in the global menu bar,
> if the minor mode is enabled.

In the mode-line, down-mouse-1 is bound to `mouse-minor-mode-menu'.
`mouse-minor-mode-menu' determines the indicator string you clicked on
and calls `minor-mode-menu-from-indicator' on it.

So the presumably easiest way to do what you want is to advice
`minor-mode-menu-from-indicator' to pop up a different menu for certain
indicators.


Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]