GNU bug report logs - #75993
Special mode-class for diff-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sat, 1 Feb 2025 17:37:01 UTC

Severity: normal

Tags: patch

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 75993 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> linkov.net>
Cc: 75993 <at> debbugs.gnu.org
Subject: Re: bug#75993: Special mode-class for diff-mode
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





This bug report was last modified 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.