Subject: bug#75993: Special mode-class for diff-mode

From: Stefan Monnier <[email-masked]>
Date: Tue, 04 Feb 2025 15:52:15 -0500

> I still don't understand implications from the above text.
> Dired is read-only by default but can be switched to editable mode,

Note that when you make it writable, Dired changes the `major-mode`.
Also, AFAIK you can't open a Dired buffer in writable mode.

> so is Diff mode.

In contrast, `diff-mode` can be used both read-only and writable without
changing `major-mode`.

> I tested with special mode-class, and see no negative side effect.

Have you tried to

    (setq diff-default-read-only nil)
    (setq view-read-only t)

and then open a read-only `.patch` file?
I think your patch will hinder
the auto-activation of `view-mode` in that case.

        Stefan