Display the language in the Flyspell mode line

* lisp/textmodes/flyspell.el (flyspell-mode): Display the language
in the mode line (bug#14957).
This commit is contained in:
Lars Ingebrigtsen 2020-09-19 16:05:55 +02:00
parent 3b79ff6179
commit b8f447867f
2 changed files with 19 additions and 1 deletions

View file

@ -1139,6 +1139,10 @@ easily bind this menu to 'down-mouse-3' (usually the right mouse button)
instead of 'mouse-2' (the default) by customizing the new user option
'flyspell-use-mouse-3-for-menu'.
---
*** The current dictionary is now displayed in the minor mode lighter.
Clicking the dictionary name changes the current dictionary.
** Time
---

View file

@ -529,7 +529,21 @@ in your init file.
\\[flyspell-region] checks all words inside a region.
\\[flyspell-buffer] checks the whole buffer."
:lighter flyspell-mode-line-string
:lighter (flyspell-mode-line-string
;; If `flyspell-mode-line-string' is nil, then nothing of
;; the following is displayed in the mode line.
((:propertize flyspell-mode-line-string)
(:propertize
(:eval
(concat "/" (substring (or ispell-local-dictionary
ispell-dictionary
"--")
0 2)))
face bold
help-echo "mouse-1: Change dictionary"
local-map (keymap
(mode-line keymap
(mouse-1 . ispell-change-dictionary))))))
:keymap flyspell-mode-map
:group 'flyspell
(if flyspell-mode