* minor-mode menu issues with per-character text props in mode line indicator
@ 2012-07-03 23:21 Steve Yegge
2012-07-03 23:27 ` minor-mode menu issues with per-character text props in mode lineindicator Drew Adams
0 siblings, 1 reply; 3+ messages in thread
From: Steve Yegge @ 2012-07-03 23:21 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]
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\x10. 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.
-steve
[-- Attachment #2: Type: text/html, Size: 1381 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-03 23:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03 23:21 minor-mode menu issues with per-character text props in mode line indicator Steve Yegge
2012-07-03 23:27 ` minor-mode menu issues with per-character text props in mode lineindicator Drew Adams
2012-07-03 23:59 ` Steve Yegge
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.