emacs-devel
[Top][All Lists]
Advanced

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

[patch] add 'q' key binding to diff


From: Benjamin Rutt
Subject: [patch] add 'q' key binding to diff
Date: Thu, 22 Jan 2004 19:46:38 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

I was inspired to make this tiny change when I began seriously using
the recent changes to VC annotate mode that enable browsing etc.  It's
nice to press "D" or "L" on a vc annotate line, and get the diff or
log message.  What isn't nice is the inconsistent ways you need to use
to quit the respective buffer and navigate back to the VC annotate
buffer you launched the diff or log view from:  for "L", you press "q"
to quit the buffer, but for "D", you have to do C-x k.  This patch
makes "q" do the same thing in diff-mode as it does when looking at a
cvs log, and is consistent with some other areas of emacs (browsing
info, for example, where "q" quits the buffer).  Also, "q" is
currently unused in diff-mode.  Let me know if this can be accepted.
Thanks,

Benjamin Rutt

Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.5619
diff -c -r1.5619 ChangeLog
*** ChangeLog   22 Jan 2004 23:37:46 -0000      1.5619
--- ChangeLog   23 Jan 2004 00:18:36 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2004-01-22  Benjamin Rutt  <address@hidden>
+ 
+         * diff-mode.el (diff-mode-shared-map): Add 'q' key binding as a
+         another way to quit the buffer.
+ 
  2004-01-23  Andre Spiegel  <address@hidden>
  
        * vc.el (vc-current-line): Function removed.  This is now done by
Index: diff-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/diff-mode.el,v
retrieving revision 1.53
diff -c -r1.53 diff-mode.el
*** diff-mode.el        14 Nov 2003 16:22:36 -0000      1.53
--- diff-mode.el        23 Jan 2004 00:18:36 -0000
***************
*** 127,133 ****
      ("r" . diff-restrict-view)
      ("R" . diff-reverse-direction)
      ("U" . diff-context->unified)
!     ("C" . diff-unified->context))
    "Basic keymap for `diff-mode', bound to various prefix keys.")
  
  (easy-mmode-defmap diff-mode-map
--- 127,134 ----
      ("r" . diff-restrict-view)
      ("R" . diff-reverse-direction)
      ("U" . diff-context->unified)
!     ("C" . diff-unified->context)
!     ("q" . quit-window))
    "Basic keymap for `diff-mode', bound to various prefix keys.")
  
  (easy-mmode-defmap diff-mode-map




reply via email to

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