unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* popup menu support for smerge-mode
@ 2003-01-10 12:16 Masatake YAMATO
  2003-01-11 19:41 ` Stefan Monnier
  0 siblings, 1 reply; 20+ messages in thread
From: Masatake YAMATO @ 2003-01-10 12:16 UTC (permalink / raw)
  Cc: emacs-devel

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  <jet@gyve.org>

	* 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2004-03-11  7:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-10 12:16 popup menu support for smerge-mode Masatake YAMATO
2003-01-11 19:41 ` Stefan Monnier
2003-08-24  6:03   ` Masatake YAMATO
2003-08-24 14:42     ` Stefan Monnier
2003-09-18  8:54       ` Masatake YAMATO
2003-09-18 15:27         ` Stefan Monnier
2003-09-19  9:25           ` Masatake YAMATO
2003-09-19 15:57             ` Stefan Monnier
2003-09-26  7:58               ` Masatake YAMATO
2003-09-26  8:44                 ` Miles Bader
2003-09-26  8:53                   ` Behavior of evaporate Masatake YAMATO
2003-09-26  9:05                     ` Miles Bader
2003-09-26  9:17                     ` David Kastrup
2003-09-26 15:59                       ` Stefan Monnier
2003-09-27  2:31                       ` Richard Stallman
2003-09-30 20:56                         ` Alex Schroeder
2003-10-20 21:23                 ` popup menu support for smerge-mode Stefan Monnier
2004-03-10  4:32                   ` Masatake YAMATO
2004-03-11  7:00                   ` Masatake YAMATO
2003-10-14  3:59               ` Masatake YAMATO

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).