From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Kifer Newsgroups: gmane.emacs.bugs Subject: bug#5052: add a menu to ediff-mult.el Date: Thu, 26 Nov 2009 15:27:09 -0500 Organization: Stony Brook University Message-ID: <20091126152709.51cc7700@kiferserv> References: <200911260332.nAQ3WQ5r026019@godzilla.ics.uci.edu> Reply-To: kifer@cs.sunysb.edu, 5052@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259268467 2549 80.91.229.12 (26 Nov 2009 20:47:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2009 20:47:47 +0000 (UTC) Cc: bug-gnu-emacs , Michael Kifer To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 26 21:47:40 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NDlFY-0001qD-8a for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Nov 2009 21:47:37 +0100 Original-Received: from localhost ([127.0.0.1]:57814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDlFX-0006F6-IQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Nov 2009 15:47:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDlFS-0006Cf-Vy for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:47:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDlFO-00066v-2d for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:47:30 -0500 Original-Received: from [199.232.76.173] (port=33916 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDlFN-00066m-Ue for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:47:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53280) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NDlFN-0002sS-Gt for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:47:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAQKlMwN031847; Thu, 26 Nov 2009 12:47:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAQKU3H3030415; Thu, 26 Nov 2009 12:30:03 -0800 Resent-Date: Thu, 26 Nov 2009 12:30:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Michael Kifer Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 26 Nov 2009 20:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 5052 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125926724530331 (code B ref -1); Thu, 26 Nov 2009 20:30:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2009 20:27:25 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAQKRMML030324 for ; Thu, 26 Nov 2009 12:27:24 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDkvy-0005WT-7I for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:27:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDkvs-0005SE-PJ for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:27:21 -0500 Original-Received: from [199.232.76.173] (port=43094 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDkvs-0005S4-FR for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:27:16 -0500 Original-Received: from sbcs.cs.sunysb.edu ([130.245.1.15]:38940) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDkvs-000182-8z for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 15:27:16 -0500 Original-Received: from kiferserv (compserv2 [130.245.1.58]) by sbcs.cs.sunysb.edu (8.13.6/8.12.11) with ESMTP id nAQKR8QI021937; Thu, 26 Nov 2009 15:27:09 -0500 (EST) In-Reply-To: <200911260332.nAQ3WQ5r026019@godzilla.ics.uci.edu> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.1; i486-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (1203?) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 26 Nov 2009 15:47:30 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32958 Archived-At: thanks. I'll put that in. On Wed, 25 Nov 2009 19:32:26 -0800 (PST) Dan Nicolaescu wrote: > We are trying to have menus in all modes. > ediff-mult.el has many commands, so a menu helps a lot. > > Here's a patch that adds it. > > > > Index: lisp/ediff-mult.el > =================================================================== > RCS file: /cvsroot/emacs/emacs/lisp/ediff-mult.el,v > retrieving revision 1.68 > diff -u -3 -p -r1.68 ediff-mult.el > --- lisp/ediff-mult.el 22 Nov 2009 03:14:15 -0000 1.68 > +++ lisp/ediff-mult.el 26 Nov 2009 03:13:36 -0000 > @@ -392,12 +392,40 @@ Toggled by ediff-toggle-verbose-help-met > (define-key ediff-meta-buffer-map "p" 'ediff-previous-meta-item) > (define-key ediff-meta-buffer-map [delete] 'ediff-previous-meta-item) > (define-key ediff-meta-buffer-map [backspace] 'ediff-previous-meta-item) > - (or (ediff-one-filegroup-metajob) > - (progn > - (define-key ediff-meta-buffer-map "=" nil) > - (define-key ediff-meta-buffer-map "==" 'ediff-meta-mark-equal-files) > - (define-key ediff-meta-buffer-map "=m" 'ediff-meta-mark-equal-files) > - (define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files))) > + > + (let ((menu-map (make-sparse-keymap "Ediff-Meta"))) > + (define-key ediff-meta-buffer-map [menu-bar ediff-meta-mode] > + (cons "Ediff-Meta" menu-map)) > + (define-key menu-map [ediff-quit-meta-buffer] > + '(menu-item "Quit" ediff-quit-meta-buffer > + :help "Quit the meta buffer")) > + (define-key menu-map [ediff-toggle-filename-truncation] > + '(menu-item "Truncate filenames" ediff-toggle-filename-truncation > + :help "Toggle truncation of long file names in session group buffers" > + :button (:toggle . ediff-meta-truncate-filenames))) > + (define-key menu-map [ediff-show-registry] > + '(menu-item "Display Ediff Registry" ediff-show-registry > + :help "Display Ediff's registry")) > + (define-key menu-map [ediff-documentation] > + '(menu-item "Show Manual" ediff-documentation > + :help "Display Ediff's manual")) > + > + (or (ediff-one-filegroup-metajob) > + (progn > + (define-key ediff-meta-buffer-map "=" nil) > + (define-key ediff-meta-buffer-map "==" 'ediff-meta-mark-equal-files) > + (define-key ediff-meta-buffer-map "=m" 'ediff-meta-mark-equal-files) > + (define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files))) > + > + > + (define-key menu-map [ediff-next-meta-item] > + '(menu-item "Next" ediff-next-meta-item > + :help "Move to the next item in Ediff registry or session group buffer")) > + (define-key menu-map [ediff-previous-meta-item] > + '(menu-item "Previous" ediff-previous-meta-item > + :help "Move to the previous item in Ediff registry or session group buffer"))) > + > + > (if ediff-no-emacs-help-in-control-buffer > (define-key ediff-meta-buffer-map "\C-h" 'ediff-previous-meta-item)) > (if (featurep 'emacs) > @@ -837,14 +865,58 @@ behavior." > ediff-meta-buffer-map "um" 'ediff-unmark-all-for-operation) > (define-key > ediff-meta-buffer-map "uh" 'ediff-unmark-all-for-hiding) > + > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-hide-marked-sessions] > + '(menu-item "Hide marked" ediff-hide-marked-sessions > + :help "Hide marked sessions. With prefix arg, unhide")) > + > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-mark-for-hiding-at-pos] > + '(menu-item "Mark for hiding" ediff-mark-for-hiding-at-pos > + :help "Mark session for hiding. With prefix arg, unmark")) > + > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-mark-for-operation-at-pos] > + '(menu-item "Mark for group operation" ediff-mark-for-operation-at-pos > + :help "Mark session for a group operation. With prefix arg, unmark.")) > + > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-unmark-all-for-hiding] > + '(menu-item "Unmark all for hiding" ediff-unmark-all-for-hiding > + :help "Unmark all sessions marked for hiding")) > + > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-unmark-all-for-operation] > + '(menu-item "Unmark all for group operation" ediff-unmark-all-for-operation > + :help "Unmark all sessions marked for operation")) > + > (cond ((ediff-collect-diffs-metajob jobname) > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-collect-custom-diffs] > + '(menu-item "Collect diffs" ediff-collect-custom-diffs > + :help "Collect custom diffs of marked sessions in buffer `*Ediff Multifile Diffs*'")) > (define-key > ediff-meta-buffer-map "P" 'ediff-collect-custom-diffs)) > ((ediff-patch-metajob jobname) > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-meta-show-patch] > + '(menu-item "Show multi-file patch" ediff-meta-show-patch > + :help "Show the multi-file patch associated with this group session")) > (define-key > ediff-meta-buffer-map "P" 'ediff-meta-show-patch))) > (define-key ediff-meta-buffer-map "^" 'ediff-up-meta-hierarchy) > - (define-key ediff-meta-buffer-map "D" 'ediff-show-dir-diffs))) > + (define-key ediff-meta-buffer-map "D" 'ediff-show-dir-diffs) > + > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-up-meta-hierarchy] > + '(menu-item "Go to parent session" ediff-up-meta-hierarchy > + :help "Go to the parent session group buffer")) > + > + (define-key ediff-meta-buffer-map > + [menu-bar ediff-meta-mode ediff-show-dir-diffs] > + '(menu-item "Diff directories" ediff-show-dir-diffs > + :help "Display differences among the directories involved in session group")))) > > (if (eq ediff-metajob-name 'ediff-registry) > (run-hooks 'ediff-registry-setup-hook) >