From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.bugs Subject: Re: bug#14957: 24.3.50; Flyspell language visible in mode line Date: Tue, 14 Jan 2014 09:58:32 +0100 Organization: Sebastien Vauban Message-ID: <86fvor6itj.fsf@somewhere.org> References: <86y58teatq.fsf@missioncriticalit.com> <87wqmfz96x.fsf@web.de> <86a9hevcyl.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389709816 594 80.91.229.3 (14 Jan 2014 14:30:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2014 14:30:16 +0000 (UTC) To: bug-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Tue Jan 14 15:30:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W350Z-0007Fx-1x for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 15:30:23 +0100 Original-Received: from localhost ([::1]:48584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W350Y-0002kc-LX for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 09:30:22 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news.nobody.at!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 54 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="24913"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX18VZixJY6kOfFH4TgY0F2X8" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:DJroDZHjg1U7f5EnXVO55lYCXy8= sha1:+dJ5MhMe4jdeJjOPrMJXY6k6QPo= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.bug:109550 X-Mailman-Approved-At: Tue, 14 Jan 2014 09:30:20 -0500 X-BeenThere: bug-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.bugs:83461 Archived-At: Hello Michael, Michael Heerdegen wrote: >> (add-to-list 'mode-line-format ...) > > 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: > > (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))) > > Does that help? It does and did. Though, when opening some types of files (?) [1], I just observed that ther= e is an error message generated: =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 File mode specification error: (wrong-type-argument buffer-or-s= tring-p =E2=94=82 (:eval (let ((dict (and (featurep (quote ispell)) (not buffer-r= ead-only) =E2=94=82 (or ispell-local-dictionary ispell-dictionary)))) (and dict (pr= opertize =E2=94=82 (concat " " (substring dict 0 2)) (quote face) (quote =E2=94=82 mode-line-highlight)))))) =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I'm not sure what to understand from that... That `mode-line-format' must be a string? Hence, how do we put the `eval' stuff? Best regards, Seb [1] Opening a file with a `.csv' extension. --=20 Sebastien Vauban