summaryrefslogtreecommitdiff
path: root/lisp/vc/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r--lisp/vc/diff-mode.el58
1 files changed, 30 insertions, 28 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index e68aa2257d2..87d30666da0 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -169,49 +169,49 @@ and hunk-based syntax highlighting otherwise as a fallback."
"N" #'diff-file-next
"p" #'diff-hunk-prev
"P" #'diff-file-prev
- ["TAB"] #'diff-hunk-next
- [backtab] #'diff-hunk-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
+ "RET" #'diff-goto-source
+ "<mouse-2>" #'diff-goto-source
"W" #'widen
"o" #'diff-goto-source ; other-window
"A" #'diff-ediff-patch
"r" #'diff-restrict-view
"R" #'diff-reverse-direction
- [remap undo] #'diff-undo)
+ "<remap> <undo>" #'diff-undo)
(defvar-keymap diff-mode-map
:doc "Keymap for `diff-mode'. See also `diff-mode-shared-map'."
- ["ESC"] (let ((map (define-keymap :parent diff-mode-shared-map)))
- ;; 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" "z"))
- (define-key map key nil))
- map)
+ "ESC" (let ((map (define-keymap :parent diff-mode-shared-map)))
+ ;; 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" "z"))
+ (keymap-set map key nil))
+ map)
;; From compilation-minor-mode.
- ["C-c C-c"] #'diff-goto-source
+ "C-c C-c" #'diff-goto-source
;; By analogy with the global C-x 4 a binding.
- ["C-x 4 A"] #'diff-add-change-log-entries-other-window
+ "C-x 4 A" #'diff-add-change-log-entries-other-window
;; Misc operations.
- ["C-c C-a"] #'diff-apply-hunk
- ["C-c C-e"] #'diff-ediff-patch
- ["C-c C-n"] #'diff-restrict-view
- ["C-c C-s"] #'diff-split-hunk
- ["C-c C-t"] #'diff-test-hunk
- ["C-c C-r"] #'diff-reverse-direction
- ["C-c C-u"] #'diff-context->unified
+ "C-c C-a" #'diff-apply-hunk
+ "C-c C-e" #'diff-ediff-patch
+ "C-c C-n" #'diff-restrict-view
+ "C-c C-s" #'diff-split-hunk
+ "C-c C-t" #'diff-test-hunk
+ "C-c C-r" #'diff-reverse-direction
+ "C-c C-u" #'diff-context->unified
;; `d' because it duplicates the context :-( --Stef
- ["C-c C-d"] #'diff-unified->context
- ["C-c C-w"] #'diff-ignore-whitespace-hunk
+ "C-c C-d" #'diff-unified->context
+ "C-c C-w" #'diff-ignore-whitespace-hunk
;; `l' because it "refreshes" the hunk like C-l refreshes the screen
- ["C-c C-l"] #'diff-refresh-hunk
- ["C-c C-b"] #'diff-refine-hunk ;No reason for `b' :-(
- ["C-c C-f"] #'next-error-follow-minor-mode)
+ "C-c C-l" #'diff-refresh-hunk
+ "C-c C-b" #'diff-refine-hunk ;No reason for `b' :-(
+ "C-c C-f" #'next-error-follow-minor-mode)
(easy-menu-define diff-mode-menu diff-mode-map
"Menu for `diff-mode'."
@@ -264,9 +264,11 @@ and hunk-based syntax highlighting otherwise as a fallback."
:help "Go to the next count'th file"]
))
-(defcustom diff-minor-mode-prefix "\C-c="
+(defcustom diff-minor-mode-prefix "C-c ="
"Prefix key for `diff-minor-mode' commands."
- :type '(choice (string "\e") (string "C-c=") string))
+ :type '(choice (string "ESC")
+ (string "C-c =") string)
+ :version "29.1")
(defvar-keymap diff-minor-mode-map
:doc "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'."