Subject: bug#40573: 27.0.90; flymake-mode broken in scratch buffer

From: Eli Zaretskii <[email-masked]>
Date: Tue, 14 Apr 2020 15:38:29 +0300

> From: João Távora <[email-masked]>
> Date: Tue, 14 Apr 2020 12:48:55 +0100
> Cc: Juri Linkov <[email-masked]>, [email-masked], 
> 	Stefan Monnier <[email-masked]>, Dmitry Gutov <[email-masked]>
> 
>  It is only important if we want this new mode to be turned on
>  automatically in such files.  If we want these files to be visited in
>  Fundamental mode, or some other random mode due to their extensions,
>  then this is indeed not important.  But then .dir-locals.el, for
>  example, will be visited in emacs-lisp-mode, something I thought we
>  wanted to prevent?
> 
> Yes, we do.  And it's trivial to add an entry for .dir-locals.el 
> to auto-mode-alist for that, as was suggested often. In hindsight
> choosing .el for that file wasn't great, but it's not very bad either.
> 
> For files under our control, we have more options, including 
> mode cookies and doing nothing.

What I was getting at was that maybe there are other extensions that
we'd like to trigger this mode.  Also, Emacs has means for
automatically turning modes on, other than the file-name extension and
the mode cookie.  Maybe some of them could be used in this case.

>  We must have some body of common traits of these files to program a
>  mode that is suitable for them.
> 
> That's easy: lisp forms that can be `read`. 

I meant traits that are relevant to what major modes do:
fontification, indentation, what is considered a defun, etc.