[Top][All Lists]

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

Re: Menu on minor mode lighter

From: Sebastian Wiesner
Subject: Re: Menu on minor mode lighter
Date: Sat, 2 Aug 2014 15:12:01 +0200

Am 01.08.2014 um 19:18 schrieb Michael Heerdegen <address@hidden>:

> 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.

Mh, the doctoring of `minor-mode-menu-from-indicator' says (emphasis mine):

Show menu for minor mode specified by INDICATOR.
Interactively, INDICATOR is read using completion.
If there is _no menu defined for the minor mode_, then create one with
items `Turn Off' and `Help’.

So how do I do that?  How do I “define a menu for a minor mode”?

reply via email to

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