Subject: bug#78124: 30.1; `revert-buffer' regression

From: Drew Adams <[email-masked]>
Date: Mon, 28 Apr 2025 23:20:37 +0000

I didn't find anything about this in NEWS, so I'm assuming this change
in behavior isn't intended.  And I HOPE it's not intended.

emacs -Q

Visit any file, say foo.el.

Use `C-x C-q' to make the buffer read-only.

M-: (revert-buffer t t)

The buffer should be changed back to writable, but it remains
read-only.  This is not the case in any prior Emacs release.

Reversion should restore the state of the saved file to the buffer,
including whether the file itself is read-only.

I bind this command to F5, so the key reverts, as on Windows:

(defun revert-buffer-no-confirm ()
  "Revert buffer without confirmation."
  (interactive) (revert-buffer t t))

Useless now.

In GNU Emacs 30.1 (build 2, x86_64-w64-mingw32) of 2025-02-23 built on
 AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.26100
System Description: Microsoft Windows 10 Pro (v10.0.2009.26100.3775)

Configured using:
 'configure --with-modules --without-dbus --with-native-compilation=aot
 --without-compress-install --with-tree-sitter CFLAGS=-O2
 prefix=/g/rel/install/emacs-30.1'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

(NATIVE_COMP present but libgccjit not available)

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252