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

From: João Távora <[email-masked]>
Date: Thu, 04 Oct 2018 16:04:16 +0100

Carlos Pita <[email-masked]> 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