From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#5043: add a menu to ediff-mult.el Date: Wed, 25 Nov 2009 19:32:26 -0800 (PST) Message-ID: <200911260332.nAQ3WQ5r026019@godzilla.ics.uci.edu> Reply-To: Dan Nicolaescu , 5043@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259207268 24572 80.91.229.12 (26 Nov 2009 03:47:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2009 03:47:48 +0000 (UTC) Cc: Michael Kifer To: bug-gnu-emacs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 26 04:47:41 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 1NDVKT-00056i-FD for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Nov 2009 04:47:37 +0100 Original-Received: from localhost ([127.0.0.1]:52650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDVKS-0005tb-MD for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2009 22:47:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDVKN-0005sr-7D for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22:47:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDVKH-0005qq-IX for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22:47:29 -0500 Original-Received: from [199.232.76.173] (port=55826 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDVKH-0005qn-Ca for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22:47:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41762) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NDVKG-0006iY-Q4 for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22: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 nAQ3lMDt003037; Wed, 25 Nov 2009 19:47:22 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAQ3e5Ss002395; Wed, 25 Nov 2009 19:40:05 -0800 Resent-Date: Wed, 25 Nov 2009 19:40:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 26 Nov 2009 03:40:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 5043 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12592064571940 (code B ref -1); Thu, 26 Nov 2009 03:40:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2009 03:34:17 +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 nAQ3YF3d001937 for ; Wed, 25 Nov 2009 19:34:16 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDV7X-0008Bq-6x for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22:34:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDV7S-00087s-B9 for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22:34:14 -0500 Original-Received: from [199.232.76.173] (port=46485 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDV7S-00087i-3g for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22:34:10 -0500 Original-Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]:53870) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NDV7R-0005c9-MR for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2009 22:34:10 -0500 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nAQ3WQm9026789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Nov 2009 19:32:26 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nAQ3WQ5r026019; Wed, 25 Nov 2009 19:32:26 -0800 (PST) Original-Lines: 121 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nAQ3WQm9026789 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 25 Nov 2009 22:47:29 -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:32948 Archived-At: 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)