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

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

bug#32350: 26.1; Disabling flymake from file-local eval is buggy


From: João Távora
Subject: bug#32350: 26.1; Disabling flymake from file-local eval is buggy
Date: Thu, 04 Oct 2018 16:04:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

Carlos Pita <carlosjosepita@gmail.com> writes:

> Just try putting this in test.el and reopening it:
>
>     ;; -*- eval: (flymake-mode -1) -*-
>
>     (1 1)
>
> Flymake will be off, it won't write anything to the modeline but the
> fringe and in-buffer underline indicators will still be there.
>
> If you eval the same expression using M-: after the buffer is loaded
> flymake mode is fully turned off as expected.

Hi Carlos,

Perhaps the best way to turn off flymake on a file-by-file basis is to
use the flymake-diagnostic-functions local variable instead, with the
added benefit that it won't be risky if you set it to a null value.

    flymake-diagnostic-functions is a variable defined in `flymake.el'.
    Its value is nil
     
      This variable may be risky if used as a file-local variable.
      This variable is safe as a file local variable if its value
      satisfies the predicate `null'.

I don't know how hard it is to make mode-specific eval's work properly
from file-local-variables but I would suspect flymake-mode isn't the
only mode affected by this.

João





reply via email to

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