From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: Re: add a tooltip and a mouse binding to the VC mode-line entry Date: Fri, 06 Jul 2007 14:06:07 +0900 (JST) Message-ID: <20070706.140607.81800388.jet@gyve.org> References: <200707031711.l63HB39F025974@oogie-boogie.ics.uci.edu> <200707051545.l65FjSgW019871@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1183698395 12469 80.91.229.12 (6 Jul 2007 05:06:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2007 05:06:35 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: dann@ics.uci.edu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 06 07:06:34 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6g1Y-0005BE-Rs for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2007 07:06:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6g1Y-0007vv-Dv for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2007 01:06:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6g1T-0007vS-Vy for emacs-devel@gnu.org; Fri, 06 Jul 2007 01:06:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6g1R-0007ul-Az for emacs-devel@gnu.org; Fri, 06 Jul 2007 01:06:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6g1R-0007ui-3H for emacs-devel@gnu.org; Fri, 06 Jul 2007 01:06:25 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I6g1N-0006QS-Le; Fri, 06 Jul 2007 01:06:21 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l6656FvS021086; Fri, 6 Jul 2007 01:06:15 -0400 Original-Received: from pobox.tokyo.redhat.com (pobox.tokyo.redhat.com [172.16.33.225]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6656E6L015955; Fri, 6 Jul 2007 01:06:15 -0400 Original-Received: from localhost (gps06.tokyo.redhat.com [172.16.32.89]) by pobox.tokyo.redhat.com (8.12.11.20060308/8.12.8) with ESMTP id l6656COI019958; Fri, 6 Jul 2007 14:06:13 +0900 In-Reply-To: <200707051545.l65FjSgW019871@oogie-boogie.ics.uci.edu> X-Mailer: Mew version 5.2 on Emacs 22.1.50 / Mule 5.0 (SAKAKI) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74378 Archived-At: > Here's a little patch that adds a tooltip to the VC entry on the > mode line and it also makes mouse-1 on that entry to pop up the VC > operations menu. > > It would be good if people would try it and say if it useful based on > _actual usage experience_, not just speculation. After that we can > change the text for the tooltip, add more mouse bindings or even > decide not to install the whole thing. Looks good. Now I can hide the menu bar:-P. @@ -291,7 +303,10 @@ 'mode-line-buffer-identification (propertize " " 'help-echo help-echo) 'mode-line-position - '(vc-mode vc-mode) + (list + `(:propertize ("" vc-mode) help-echo "Version Control mouse-1: VC menu" + mouse-face mode-line-highlight + local-map ,mode-line-vc-mode-keymap)) (propertize " " 'help-echo help-echo) 'mode-line-modes `(which-func-mode ("" which-func-format ,dashes)) I think this should be done in `vc-mode-line'. Look at `vc-default-mode-line-string'. Telling the meaning of `:' or `-' in the tooltip string may help users. Masatake