From 705c0e3729bf53db9e84ae7c8b932ebc3b2da934 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 30 Jan 2026 11:21:27 +0000 Subject: [PATCH] Bind 's' to diff-split-hunk in read-only diff-mode * lisp/vc/diff-mode.el (diff-mode-shared-map): Bind 's' to 'diff-split-hunk'. * etc/NEWS: Document the change. --- etc/NEWS | 3 +++ lisp/vc/diff-mode.el | 1 + 2 files changed, 4 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index eca0c070783..78d627068c4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2293,6 +2293,9 @@ region overlaps. Otherwise, they have their existing behavior. With a prefix argument, it now reverse-applies hunks. This matches the existing prefix argument to 'diff-apply-hunk'. +--- +*** 's' is now bound to 'diff-split-hunk' in read-only Diff mode buffers. + ** Ediff +++ diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 5c0fb5fba4c..f57f39de37c 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -218,6 +218,7 @@ See also `diff-mode-read-only-map'." "" #'diff-goto-source "o" #'diff-goto-source ; other-window " " #'undo-ignore-read-only + "s" #'diff-split-hunk ;; The foregoing commands don't affect buffers beyond this one. ;; The following command is the only one that has a single-letter