Variable: diff-mode-shared-map

diff-mode-shared-map is a variable defined in diff-mode.el.gz.

Value

<backtab>  diff-hunk-prev
<mouse-2>  diff-goto-source
A          diff-ediff-patch
C-x u      diff-undo
K          diff-file-kill
N          diff-file-next
P          diff-file-prev
R          diff-reverse-direction
RET        diff-goto-source
TAB        diff-hunk-next
W          widen
k          diff-hunk-kill
n          diff-hunk-next
o          diff-goto-source
p          diff-hunk-prev
r          diff-restrict-view
u          diff-revert-and-kill-hunk
w          diff-kill-ring-save
{          diff-file-prev
}          diff-file-next

Documentation

Additional bindings for read-only diff-mode buffers.

These bindings are also available with an ESC prefix
(i.e. a `M-' prefix) in read-write diff-mode buffers,
and with a diff-minor-mode-prefix prefix in diff-minor-mode(var)/diff-minor-mode(fun).

Source Code

;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
;;;;
;;;; keymap, menu, ...
;;;;

;; The additional bindings in read-only `diff-mode' buffers are not
;; activated by turning on `diff-minor-mode' in those buffers.  Instead,
;; a special entry in `minor-mode-map-alist' is used to achieve that.
;; I.e., `diff-mode-read-only' is a pseudo-minor mode for read-only
;; `diff-mode' buffers, while `diff-minor-mode' is a bona fide minor
;; mode for non-`diff-mode' buffers.  (It's not clear there are
;; practical uses for `diff-minor-mode': bug#34080).

(defvar-keymap diff-mode-shared-map
  :doc "Additional bindings for read-only `diff-mode' buffers.
These bindings are also available with an ESC prefix
(i.e. a \\=`M-' prefix) in read-write `diff-mode' buffers,
and with a `diff-minor-mode-prefix' prefix in `diff-minor-mode'."
  "n" #'diff-hunk-next
  "N" #'diff-file-next
  "p" #'diff-hunk-prev
  "P" #'diff-file-prev
  "TAB" #'diff-hunk-next
  "<backtab>" #'diff-hunk-prev
  "k" #'diff-hunk-kill
  "K" #'diff-file-kill
  "}" #'diff-file-next                  ; From compilation-minor-mode.
  "{" #'diff-file-prev
  "RET" #'diff-goto-source
  "<mouse-2>" #'diff-goto-source
  "W" #'widen
  "w" #'diff-kill-ring-save
  "o" #'diff-goto-source                ; other-window
  "A" #'diff-ediff-patch
  "r" #'diff-restrict-view
  "R" #'diff-reverse-direction
  "<remap> <undo>" #'diff-undo

  ;; The foregoing commands don't affect buffers beyond this one.
  ;; The following command is the only one that has a single-letter
  ;; binding and which affects buffers beyond this one.
  ;; However, the following command asks for confirmation by default,
  ;; so that seems okay.  --spwhitton
  "u" #'diff-revert-and-kill-hunk)