[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14957: 24.3.50; Flyspell language visible in mode line
From: |
Lars Ingebrigtsen |
Subject: |
bug#14957: 24.3.50; Flyspell language visible in mode line |
Date: |
Sat, 19 Sep 2020 16:01:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> That's sub-optimal IMO. I like the "Fly[br]" variant much better.
Me too. Or... Fly/br? That's one character less. I did that instead;
feel free to change if "Fly[br]" is more understandable.
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Isn't it possible to use a sequence of multiple `propertize' mode-line
> specs?
Hm... I thought they were overwritten here:
(defvar mode-line-modes
[...]
`(: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)
But the properties :propertize properties seem to survive? Yup.
Now implemented and pushed. I had to cheat a bit here, since the
define-minor-mode machinery doesn't allow evaluating anything at all in
the :lighter keyword, so I had to put a keymap construct directly into
it:
+ local-map (keymap
+ (mode-line keymap
+ (mouse-1 . ispell-change-dictionary))))))
Which is kinda hacky, but...
There was also some suggestion about showing this data in all buffers
that have ispell-dictionary bound, but in my testing, I found that that
led to the language being displayed in some special modes, too, so I
don't think that's workable. So it's just in Flyspell mode.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no