GNU bug report logs - #14957
24.3.50; Flyspell language visible in mode line

Previous Next

Package: emacs;

Reported by: Sebastien Vauban <sva-news <at> mygooglest.com>

Date: Fri, 26 Jul 2013 13:01:03 UTC

Severity: wishlist

Tags: fixed

Found in version 24.3.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Sebastien Vauban <sva-news <at> mygooglest.com>
Cc: 14957 <at> debbugs.gnu.org
Subject: bug#14957: 24.3.50; Flyspell language visible in mode line
Date: Fri, 08 Nov 2013 22:30:31 +0100
Hi Sebastien,

> (add-to-list 'mode-line-format
>              '(:eval
>                (let ((dict (and (featurep 'ispell)
>                                 (or ispell-local-dictionary
>                                     ispell-dictionary))))
>                  (and dict
>                       (concat " ["
>                               (propertize (substring dict 0 2)
>                                           'face 'mode-line-highlight)
>                               "]"))))

That's not good.  `mode-line-format' "automatically becomes buffer-local
when set" (see C-h v).  Your `add-to-list' only manipulates the
`mode-line-format' of the current buffer when your code is evaluated
(*scratch*, probably).

You have to modify the default value, like this:

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

Does that help?


Regards,

Michael.




This bug report was last modified 4 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.