* bug#5043: add a menu to ediff-mult.el
@ 2009-11-26 3:32 Dan Nicolaescu
2009-11-26 20:27 ` bug#5052: " Michael Kifer
0 siblings, 1 reply; 3+ messages in thread
From: Dan Nicolaescu @ 2009-11-26 3:32 UTC (permalink / raw)
To: bug-gnu-emacs; +Cc: Michael Kifer
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#5052: add a menu to ediff-mult.el
2009-11-26 3:32 bug#5043: add a menu to ediff-mult.el Dan Nicolaescu
@ 2009-11-26 20:27 ` Michael Kifer
2009-12-04 20:51 ` Dan Nicolaescu
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kifer @ 2009-11-26 20:27 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: bug-gnu-emacs, Michael Kifer
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)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#5052: add a menu to ediff-mult.el
2009-11-26 20:27 ` bug#5052: " Michael Kifer
@ 2009-12-04 20:51 ` Dan Nicolaescu
0 siblings, 0 replies; 3+ messages in thread
From: Dan Nicolaescu @ 2009-12-04 20:51 UTC (permalink / raw)
To: kifer; +Cc: 5052
Michael Kifer <kifer@cs.sunysb.edu> writes:
> thanks. I'll put that in.
Can you please do this before Tuesday (the feature freeze date for the
23.2 release)?
If not, please let me know and I can do it.
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-04 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-26 3:32 bug#5043: add a menu to ediff-mult.el Dan Nicolaescu
2009-11-26 20:27 ` bug#5052: " Michael Kifer
2009-12-04 20:51 ` Dan Nicolaescu
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).