From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Rutt Newsgroups: gmane.emacs.devel Subject: [patch] add 'q' key binding to diff Date: Thu, 22 Jan 2004 19:46:38 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074819416 20188 80.91.224.253 (23 Jan 2004 00:56:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2004 00:56:56 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jan 23 01:56:46 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ajpcs-0002zj-00 for ; Fri, 23 Jan 2004 01:56:46 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ajpcs-0007QE-00 for ; Fri, 23 Jan 2004 01:56:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjpbT-0002QL-Ns for emacs-devel@quimby.gnus.org; Thu, 22 Jan 2004 19:55:19 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AjpZa-00020v-DN for emacs-devel@gnu.org; Thu, 22 Jan 2004 19:53:22 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AjpZ2-0001o8-B5 for emacs-devel@gnu.org; Thu, 22 Jan 2004 19:53:19 -0500 Original-Received: from [164.107.123.5] (helo=cis.ohio-state.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjpT6-0000fF-GN for emacs-devel@gnu.org; Thu, 22 Jan 2004 19:46:40 -0500 Original-Received: from mu.cis.ohio-state.edu (daemon@mu.cis.ohio-state.edu [164.107.112.41]) by cis.ohio-state.edu (8.11.6p2-20030924/8.11.6) with ESMTP id i0N0kcP08199 for ; Thu, 22 Jan 2004 19:46:38 -0500 (EST) Original-Received: (from rutt@localhost) by mu.cis.ohio-state.edu (8.11.6p2-20030924/8.11.6) id i0N0kcK10510; Thu, 22 Jan 2004 19:46:38 -0500 (EST) X-Authentication-Warning: mu.cis.ohio-state.edu: rutt set sender to rutt.4@osu.edu using -f Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19447 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19447 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 + + * diff-mode.el (diff-mode-shared-map): Add 'q' key binding as a + another way to quit the buffer. + 2004-01-23 Andre Spiegel * 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