[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:42:20 +0200 |
Am 02.08.2014 um 15:12 schrieb Sebastian Wiesner <swiesner@lunaryorn.com>:
>
> Am 01.08.2014 um 19:18 schrieb Michael Heerdegen <michael_heerdegen@web.de>:
>
>> Sebastian Wiesner <swiesner@lunaryorn.com> 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):
It’s the _docstring_ of course… sorry about that.