bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: bug#14957: 24.3.50; Flyspell language visible in mode line


From: Sebastien Vauban
Subject: Re: bug#14957: 24.3.50; Flyspell language visible in mode line
Date: Thu, 14 Nov 2013 11:41:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Michael Heerdegen wrote:
> "Sebastien Vauban" writes:
>
>> FYI, there is one minor annoyance; I'd like to see the language indicator
>> only where it makes sense, that is NOT in (almost) every buffer. For
>> example, I do see "fr" (my default dictionary) in the Emacs manuals, which
>> is twice wrong:
>>
>> - they're in English, and
>> - they're read-only...
>>
>> I guess the read-only feature is the way to specify (in an automatic way)
>> the visibility (by default) of that feature. WDYT? In such a case, we simply
>> have to add a condition in the above "and" expression.
>
> Yes, that sounds reasonable.

Current version:

--8<---------------cut here---------------start------------->8---
     (setq-default mode-line-format
                   (cons
                    '(:eval
                      (let ((dict (and (featurep 'ispell)
                                       (not buffer-read-only)
                                       (or ispell-local-dictionary
                                           ispell-dictionary))))
                        (and dict
                             (propertize (concat " [" (substring dict 0 2) "]")
                                         'face 'mode-line-highlight))))
                    (default-value 'mode-line-format)))
--8<---------------cut here---------------end--------------->8---

> @Everybody: would it make sense to add a new variable
> `mode-line-dictionary' that shows the abbreviated name of the current
> dictionary when appropriate?  Spell checking is essential when editing
> any buffer, so showing the dictionary is not less useful than showing
> the input method.  People that don't want to see it anyway could just
> customize the variable to nil.

+1

> We could also make it display something only when the dictionary is not the
> default one.

I'd prefer to always (when it makes sense) see the current dict, with the same
argument as the one you just used: like the input method, we want to always see
the current one in the mode line.

Best regards,
  Seb

-- 
Sebastien Vauban


reply via email to

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