Disable diff-restrict-view by default

* lisp/vc/diff-mode.el (diff-restrict-view): Disable it.
* etc/NEWS: Announce the change.
This commit is contained in:
Sean Whitton 2026-01-10 11:57:09 +00:00
parent 6e4bceb8ce
commit 852ca2ff40
2 changed files with 8 additions and 0 deletions

View file

@ -2825,6 +2825,13 @@ already have, consider replacing the default global bindings, like this:
---
*** New command alias 'vc-restore' for 'vc-revert'.
---
*** The 'diff-restrict-view' command is disabled by default.
This command is Diff mode's specialized 'narrow-to-region'.
'narrow-to-region' has long been disabled by default, so for
consistency, 'diff-restrict-view' is now too.
To enable it again, use 'M-x enable-command'.
** Package
+++

View file

@ -875,6 +875,7 @@ If the prefix ARG is given, restrict the view to the current file instead."
(apply #'narrow-to-region
(if arg (diff-bounds-of-file) (diff-bounds-of-hunk)))
(setq-local diff-narrowed-to (if arg 'file 'hunk)))
(put 'diff-restrict-view 'disabled t)
(defun diff--some-hunks-p ()
(save-excursion