[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
popup menu support for smerge-mode
From: |
Masatake YAMATO |
Subject: |
popup menu support for smerge-mode |
Date: |
Fri, 10 Jan 2003 21:16:45 +0900 (JST) |
Hi,
I've added popup menu support in smerge-mode.
Could you evaluate my patch? and if you prefer, please
add the patch to official source tree.
I use menu-bar often to invoke smerge because I cannot memorize
C-c ^ key binding. So each time I'd like to use smerge, I have to
do M-x menu-bar-mode:-P
Regards,
Masatake YAMATO
2003-01-10 Masatake YAMATO <address@hidden>
* smerge-mode.el (smerge-match-conflict): put highlight
as mouse-face to conflict text areas. show popup-menu if
mouse-2 is down in conflict text areas.
Index: smerge-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/smerge-mode.el,v
retrieving revision 1.20
diff -u -r1.20 smerge-mode.el
--- smerge-mode.el 10 Oct 2002 17:30:20 -0000 1.20
+++ smerge-mode.el 10 Jan 2003 12:35:28 -0000
@@ -370,7 +370,14 @@
(setq base-end mine-end)
(setq mine-start other-start)
(setq mine-end other-end)))
-
+
+ (put-text-property start end
+ 'mouse-face 'highlight)
+ (put-text-property start end
+ 'keymap (let ((km (make-sparse-keymap)))
+ (define-key km [down-mouse-2]
#'smerge-mode-menu)
+ km))
+
(store-match-data (list start end
mine-start mine-end
base-start base-end
- popup menu support for smerge-mode,
Masatake YAMATO <=