;;;;
(defvar-keymap diff-mode-shared-map
- :parent special-mode-map
"n" #'diff-hunk-next
"N" #'diff-file-next
"p" #'diff-hunk-prev
;; We want to inherit most bindings from
;; `diff-mode-shared-map', but not all since they may hide
;; useful `M-<foo>' global bindings when editing.
- (dolist (key '("A" "r" "R" "g" "q" "W" "w" "z" "?"
- "SPC" "S-SPC" "DEL"))
+ (dolist (key '("A" "r" "R" "W" "w"))
(keymap-set map key nil))
map)
;; From compilation-minor-mode.
;; It should be lower than `outline-minor-mode' and `view-mode'.
(or (assq 'diff-mode-read-only minor-mode-map-alist)
(nconc minor-mode-map-alist
- (list (cons 'diff-mode-read-only diff-mode-shared-map))))
+ (list (cons 'diff-mode-read-only
+ (make-composed-keymap diff-mode-shared-map
+ special-mode-map)))))
(defvar whitespace-style)
(defvar whitespace-trailing-regexp)