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)
(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.