From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: popup menu support for smerge-mode Date: Fri, 10 Jan 2003 21:16:45 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030110.211645.48817912.jet@gyve.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1042202535 24401 80.91.224.249 (10 Jan 2003 12:42:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 10 Jan 2003 12:42:15 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18WyUH-0006LK-00 for ; Fri, 10 Jan 2003 13:42:13 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18WyaI-0006uq-00 for ; Fri, 10 Jan 2003 13:48:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WyUP-0002Vb-02 for emacs-devel@quimby.gnus.org; Fri, 10 Jan 2003 07:42:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18WyTq-0001hW-00 for emacs-devel@gnu.org; Fri, 10 Jan 2003 07:41:46 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18WyTj-0001O3-00 for emacs-devel@gnu.org; Fri, 10 Jan 2003 07:41:42 -0500 Original-Received: from r-maa.spacetown.ne.jp ([210.130.136.40]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WyT1-0000aM-00 for emacs-devel@gnu.org; Fri, 10 Jan 2003 07:40:56 -0500 Original-Received: from localhost (mx.jp.redhat.com [219.96.218.186]) by r-maa.spacetown.ne.jp (8.11.6) with ESMTP id h0ACenY22555; Fri, 10 Jan 2003 21:40:50 +0900 (JST) Original-To: Stefan Monnier X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10626 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10626 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 * 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