[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50147: Wishlist: Display mode name in mode line tooltip
From: |
Lars Ingebrigtsen |
Subject: |
bug#50147: Wishlist: Display mode name in mode line tooltip |
Date: |
Sun, 22 Aug 2021 16:46:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Kangas <stefan@marxist.se> writes:
> When I hover over the major and minor mode names in the mode line, the
> tooltip says "Minor mode" or "Major mode".
>
> It would be useful if it could display the full mode name in the tooltip.
I think so, too. Today those things are just constant strings -- it'd
be nice to be able to add this in a non-consing way (i.e., without
having to create a new big-ish string every time we display the mode
line).
Here's the current code:
`(:propertize ("" mode-name)
help-echo "Major mode\n\
mouse-1: Display major mode menu\n\
mouse-2: Show help for major mode\n\
mouse-3: Toggle minor modes"
mouse-face mode-line-highlight
local-map ,mode-line-major-mode-keymap)
This is quite careful to not create any garbage.
Hm... perhaps we could just make the help-echo point to a function
instead? That should have no performance impact, I think.
'("" mode-line-process)
`(:propertize ("" minor-mode-alist)
mouse-face mode-line-highlight
help-echo "Minor mode\n\
mouse-1: Display minor mode menu\n\
mouse-2: Show help for minor mode\n\
mouse-3: Toggle minor modes"
local-map ,mode-line-minor-mode-keymap)
The minor modes are done in one go, though, so that'd have to be
changed?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no