all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Kifer <kifer@cs.sunysb.edu>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: bug-gnu-emacs <bug-gnu-emacs@gnu.org>,
	Michael Kifer <kifer@cs.stonybrook.edu>
Subject: bug#5052: add a menu  to ediff-mult.el
Date: Thu, 26 Nov 2009 15:27:09 -0500	[thread overview]
Message-ID: <20091126152709.51cc7700@kiferserv> (raw)
In-Reply-To: <200911260332.nAQ3WQ5r026019@godzilla.ics.uci.edu>

thanks. I'll put that in.

On Wed, 25 Nov 2009 19:32:26 -0800 (PST)
Dan Nicolaescu <dann@ics.uci.edu> 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)
> 






  reply	other threads:[~2009-11-26 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26  3:32 bug#5043: add a menu to ediff-mult.el Dan Nicolaescu
2009-11-26 20:27 ` Michael Kifer [this message]
2009-12-04 20:51   ` bug#5052: " Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091126152709.51cc7700@kiferserv \
    --to=kifer@cs.sunysb.edu \
    --cc=5052@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=dann@ics.uci.edu \
    --cc=kifer@cs.stonybrook.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.