]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/diff-mode.el (diff-mode): Disable view-mode keybindings.
authorJuri Linkov <juri@linkov.net>
Sun, 9 Feb 2025 07:40:44 +0000 (09:40 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:48:03 +0000 (09:48 +0100)
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

index 7d92676d7992508e280427a5152f362782aa9d6f..bb1f8068d489a512db95e3410c6620512c5eb458 100644 (file)
@@ -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.