emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103684: * vc/diff-mode.el (diff-mode


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103684: * vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from
Date: Fri, 18 Mar 2011 15:52:05 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103684
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2011-03-18 15:52:05 -0400
message:
  * 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.
modified:
  lisp/ChangeLog
  lisp/vc/diff-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-18 13:45:04 +0000
+++ b/lisp/ChangeLog    2011-03-18 19:52:05 +0000
@@ -1,7 +1,8 @@
-2011-03-17  Lars Magne Ingebrigtsen  <address@hidden>
+2011-03-18  Stefan Monnier  <address@hidden>
 
-       * calendar/time-date.el (format-seconds): Use assoc instead of
-       assoc-string to avoid warning on XEmacs.
+       * vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from
+       diff-mode-shared-map (bug#8284).
+       (diff-mode-shared-map): Re-introduce some bindings that were 
problematic.
 
 2011-03-17  Lars Magne Ingebrigtsen  <address@hidden>
 

=== modified file 'lisp/vc/diff-mode.el'
--- a/lisp/vc/diff-mode.el      2011-03-04 08:01:24 +0000
+++ b/lisp/vc/diff-mode.el      2011-03-18 19:52:05 +0000
@@ -122,8 +122,7 @@
     ("\C-m" . diff-goto-source)
     ([mouse-2] . diff-goto-source)
     ;; From XEmacs' diff-mode.
-    ;; Standard M-w is useful, so don't change M-W.
-    ;;("W" . widen)
+    ("W" . widen)
     ;;("." . diff-goto-source)         ;display-buffer
     ;;("f" . diff-goto-source)         ;find-file
     ("o" . diff-goto-source)           ;other-window
@@ -135,17 +134,21 @@
     ;; Not useful if you have to metafy them.
     ;;(" " . scroll-up)
     ;;("\177" . scroll-down)
-    ;; Standard M-a is useful, so don't change M-A.
-    ;;("A" . diff-ediff-patch)
-    ;; Standard M-r is useful, so don't change M-r or M-R.
-    ;;("r" . diff-restrict-view)
-    ;;("R" . diff-reverse-direction)
-    )
+    ("A" . diff-ediff-patch)
+    ("r" . diff-restrict-view)
+    ("R" . diff-reverse-direction))
   "Basic keymap for `diff-mode', bound to various prefix keys."
   :inherit special-mode-map)
 
 (easy-mmode-defmap diff-mode-map
-  `(("\e" . ,diff-mode-shared-map)
+  `(("\e" . ,(let ((map (make-sparse-keymap)))
+               ;; 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.
+               (set-keymap-parent map diff-mode-shared-map)
+               (dolist (key '("A" "r" "R" "g" "q" "W"))
+                 (define-key map key nil))
+               map))
     ;; From compilation-minor-mode.
     ("\C-c\C-c" . diff-goto-source)
     ;; By analogy with the global C-x 4 a binding.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]