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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 14 Apr 2020 18:42:54 +0300

> From: João Távora <[email-masked]>
> Date: Tue, 14 Apr 2020 13:56:28 +0100
> Cc: Juri Linkov <[email-masked]>, [email-masked], 
> 	Stefan Monnier <[email-masked]>, Dmitry Gutov <[email-masked]>
> 
> > 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.
> 
> Do you mean magic-mode-alist?

That's one such feature, yes.  There are others:
interpreter-mode-alist, auto-mode-interpreter-regexp, etc.

> Do you think you'd be able
> to come up with something that won't yield a lot  of false
> positives or a lot of false negatives?  If so, don't  let me
> stop you.

I was just asking whether any of these can be relevant, that's all.  A
negative answer is OK.

> > I meant traits that are relevant to what major modes do:
> > fontification, indentation, what is considered a defun, etc.
> 
> Sure, and I meant it's easier to think of them as subtraction 
> from the existing emacs-lisp-mode.  Ask yourself the inverse
> question: what things _aren't_ relevant.

I was asking that aloud.

> Re. defun finding.  In general, there are no things
> analogous to a defun in data files, there just aren't!

I think the example shown by Juri included a lambda-function.