From 859e0622ae5e8303d288a345d9ef9181fa0aa6ae Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 5 Apr 2026 13:50:35 +0100 Subject: [PATCH] * lisp/vc/diff-mode.el (diff-mode-read-only-map): Bind 'v'. --- etc/NEWS | 3 +++ lisp/vc/diff-mode.el | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 0ac0ee9f843..571253f33fc 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2418,6 +2418,9 @@ you are in buffers generated by 'C-x v =' and 'C-x v D'. When the region is active, the command reverse-applies and kills hunks that the region overlaps. +--- +*** 'v' is now bound to 'vc-next-action' in read-only Diff mode buffers. + --- *** 'diff-file-prev' and 'diff-hunk-prev' always move to start of header. Previously, 'diff-file-prev' and 'diff-hunk-prev' would move when point diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 8a432a7f618..5d6f478d3e8 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -241,10 +241,11 @@ buffers." ;; The foregoing commands in `diff-mode-shared-map' and ;; `diff-mode-read-only-map' don't affect buffers beyond this one. - ;; The following command is the only one that has a single-character - ;; binding and which affects buffers beyond this one. However, the - ;; following command asks for confirmation by default, so that seems - ;; okay. --spwhitton + ;; The following commands are the only ones that have a + ;; single-character binding and which affect something beyond the + ;; current buffer. However, the following commands ask for + ;; confirmation by default, so that seems okay. --spwhitton + "v" #'vc-next-action "u" #'diff-revert-and-kill-hunk ;; `diff-revert-and-kill-hunk' is the `diff-mode' analogue of what '@' ;; does in VC-Dir, so give it the same short binding.