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

From: João Távora <[email-masked]>
Date: Sun, 19 Apr 2020 10:25:41 +0100

On Sun, Apr 19, 2020 at 1:05 AM Dmitry Gutov <[email-masked]> wrote:

> On 19.04.2020 02:36, João Távora wrote:
> > -(define-derived-mode lisp-mode prog-mode "Lisp"
> > +(define-derived-mode lisp-mode lisp-data-mode "Lisp"
>
> Speaking of. Is lisp-mode a special case of lisp-data-mode?
>
> I would say maybe not: you usually can't (read) a whole Lisp buffer,
> right?

What do you mean? In what conditions? If anything it's more so
than in Emacs, because you can program CL's read-table and
make Lisp files look like JS, if you really want (but noone does that).
In that case lisp-data-mode would maybe break down a bit, but
so would lisp-mode itself since the syntax table wouldn't track those
changes (though It can take quite a beating, especially with
SLY/SLIME's enhancements).  In that situation, you'd have to
use something like LSP, where the server constanty tell the
editor of the syntax of things.  In all my years of CL, I've not
seen this a problem in practice.

So I would make lisp-data-mode inherit from prog-mode (and have
> them share a helper initializer).
>

If there is indeed a problem like this, then that's a solution yes.
Basically amounts to using composition instead of inheritance.
But I don't see it.

João