From ef56320d489cc19707b27e0992d29aaf3e9d45c5 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 9 Feb 2025 09:40:44 +0200 Subject: [PATCH] * lisp/vc/diff-mode.el (diff-mode): Disable view-mode keybindings. Put the property 'mode-class' with the value 'special' on the symbol 'diff-mode'. This fixes the case when 'view-read-only' is non-nil by disabling activation of 'view-mode' that overrides single keys from 'diff-mode-shared-map' (bug#75993). (cherry picked from commit 35fa7126903a0ac6a28901d194f0753acf60928d) --- lisp/vc/diff-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 7d92676d799..bb1f8068d48 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1549,6 +1549,7 @@ else cover the whole buffer." (defvar whitespace-style) (defvar whitespace-trailing-regexp) +(put 'diff-mode 'mode-class 'special) ;;;###autoload (define-derived-mode diff-mode fundamental-mode "Diff" "Major mode for viewing/editing context diffs. -- 2.39.5