aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2011-03-18 15:52:05 -0400
committerStefan Monnier2011-03-18 15:52:05 -0400
commita904a09a8b84daa15857197eed9eb99655d2bbb5 (patch)
tree56687d2af51ed43107f5943724be5fd1bf91f9c9
parent1518e4f02dab44ba5388cd8b0699749ee30d3eff (diff)
downloademacs-a904a09a8b84daa15857197eed9eb99655d2bbb5.tar.gz
emacs-a904a09a8b84daa15857197eed9eb99655d2bbb5.zip
* vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from
diff-mode-shared-map. (diff-mode-shared-map): Re-introduce some bindings that were problematic. Fixes: debbugs:8284
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc/diff-mode.el21
2 files changed, 16 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6d4e8424f74..3a8cf025ad6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,8 @@
12011-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org> 12011-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * calendar/time-date.el (format-seconds): Use assoc instead of 3 * vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from
4 assoc-string to avoid warning on XEmacs. 4 diff-mode-shared-map (bug#8284).
5 (diff-mode-shared-map): Re-introduce some bindings that were problematic.
5 6
62011-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org> 72011-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
7 8
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 9ccb37f3a55..72f415a9b94 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -122,8 +122,7 @@ when editing big diffs)."
122 ("\C-m" . diff-goto-source) 122 ("\C-m" . diff-goto-source)
123 ([mouse-2] . diff-goto-source) 123 ([mouse-2] . diff-goto-source)
124 ;; From XEmacs' diff-mode. 124 ;; From XEmacs' diff-mode.
125 ;; Standard M-w is useful, so don't change M-W. 125 ("W" . widen)
126 ;;("W" . widen)
127 ;;("." . diff-goto-source) ;display-buffer 126 ;;("." . diff-goto-source) ;display-buffer
128 ;;("f" . diff-goto-source) ;find-file 127 ;;("f" . diff-goto-source) ;find-file
129 ("o" . diff-goto-source) ;other-window 128 ("o" . diff-goto-source) ;other-window
@@ -135,17 +134,21 @@ when editing big diffs)."
135 ;; Not useful if you have to metafy them. 134 ;; Not useful if you have to metafy them.
136 ;;(" " . scroll-up) 135 ;;(" " . scroll-up)
137 ;;("\177" . scroll-down) 136 ;;("\177" . scroll-down)
138 ;; Standard M-a is useful, so don't change M-A. 137 ("A" . diff-ediff-patch)
139 ;;("A" . diff-ediff-patch) 138 ("r" . diff-restrict-view)
140 ;; Standard M-r is useful, so don't change M-r or M-R. 139 ("R" . diff-reverse-direction))
141 ;;("r" . diff-restrict-view)
142 ;;("R" . diff-reverse-direction)
143 )
144 "Basic keymap for `diff-mode', bound to various prefix keys." 140 "Basic keymap for `diff-mode', bound to various prefix keys."
145 :inherit special-mode-map) 141 :inherit special-mode-map)
146 142
147(easy-mmode-defmap diff-mode-map 143(easy-mmode-defmap diff-mode-map
148 `(("\e" . ,diff-mode-shared-map) 144 `(("\e" . ,(let ((map (make-sparse-keymap)))
145 ;; We want to inherit most bindings from diff-mode-shared-map,
146 ;; but not all since they may hide useful M-<foo> global
147 ;; bindings when editing.
148 (set-keymap-parent map diff-mode-shared-map)
149 (dolist (key '("A" "r" "R" "g" "q" "W"))
150 (define-key map key nil))
151 map))
149 ;; From compilation-minor-mode. 152 ;; From compilation-minor-mode.
150 ("\C-c\C-c" . diff-goto-source) 153 ("\C-c\C-c" . diff-goto-source)
151 ;; By analogy with the global C-x 4 a binding. 154 ;; By analogy with the global C-x 4 a binding.