[Top][All Lists]

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

minor-mode menu issues with per-character text props in mode line indica

From: Steve Yegge
Subject: minor-mode menu issues with per-character text props in mode line indicator
Date: Tue, 3 Jul 2012 16:21:04 -0700

I have a mode-line indicator that sets different text properties on each character in the indicator string.  It works fine -- I just make the indicator a list of propertized strings, one per character in the indicator, and they display properly in the mode line.  I can even change the text props on the fly, after which forcing a mode-line update applies the new properties.

Unfortunately I can't figure out how to create a non-default minor-mode menu for this indicator. Clicking on any letter generates an input event for `mouse-minor-mode-menu' that contains only that single propertized letter, which is then passed as the indicator key to `minor-mode-menu-from-indicator'.

If, for instance, my minor mode string is "Foo" (with each letter being propertized differently), and I click the "F", it tries to look up my minor mode menu using "F" instead of "Foo", and fails.  The "F" provided to the input event is being looked up directly in the glyph tables for the mode line at the click position, in mode_line_string().

Can anyone suggest a workaround for me?   I suppose as a last resort I could defadvice `minor-mode-menu-from-indicator', but I'm hoping for something a bit more robust.


reply via email to

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