; diff--revert-kill-hunks: Hoist binding inhibit-read-only.

This commit is contained in:
Sean Whitton 2026-02-05 12:24:05 +00:00
parent 3863449a0a
commit a06cddec20

View file

@ -2332,10 +2332,10 @@ If REVERTP is non-nil, reverse-apply hunks before killing them."
(setq beg (copy-marker beg) end (point-marker))
(unwind-protect
(cl-loop initially (goto-char beg)
with inhibit-read-only = t
for (hunk-beg hunk-end) = (diff-bounds-of-hunk)
for file-bounds = (ignore-errors (diff-bounds-of-file))
for (file-beg file-end) = file-bounds
for inhibit-read-only = t
if (and file-bounds
(progn
(goto-char file-beg)