[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add a tooltip and a mouse binding to the VC mode-line entry
From: |
Stefan Monnier |
Subject: |
Re: add a tooltip and a mouse binding to the VC mode-line entry |
Date: |
Thu, 05 Jul 2007 13:13:28 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
I believe the patch below would be pretty much equivalent, but with the
advantage that C-h k can be used on it (i.e. C-h k and then mouse-1 on the
VC thingy to select the entry you want).
Stefan
--- menu-bar.el 08 May 2007 11:55:53 -0400 1.302
+++ menu-bar.el 05 Jul 2007 13:09:04 -0400
@@ -1161,6 +1161,7 @@
'("--"))
(defvar vc-menu-map (make-sparse-keymap "Version Control"))
+(defalias 'vc-menu-map vc-menu-map)
(define-key menu-bar-tools-menu [pcl-cvs]
'(menu-item "PCL-CVS" cvs-global-menu))
(define-key menu-bar-tools-menu [vc]
--- bindings.el 13 Feb 2007 17:39:39 -0500 1.178
+++ bindings.el 05 Jul 2007 13:07:56 -0400
@@ -291,7 +291,13 @@
'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 ,(let ((map (make-sparse-keymap)))
+ (define-key map [mode-line down-mouse-1] 'vc-menu-map)
+ map)))
(propertize " " 'help-echo help-echo)
'mode-line-modes
`(which-func-mode ("" which-func-format ,dashes))
- add a tooltip and a mouse binding to the VC mode-line entry, Dan Nicolaescu, 2007/07/03
- Re: add a tooltip and a mouse binding to the VC mode-line entry, Richard Stallman, 2007/07/03
- Re: add a tooltip and a mouse binding to the VC mode-line entry, David Kastrup, 2007/07/04
- Re: add a tooltip and a mouse binding to the VC mode-line entry, Dan Nicolaescu, 2007/07/04
- Re: add a tooltip and a mouse binding to the VC mode-line entry, Dan Nicolaescu, 2007/07/05
- Re: add a tooltip and a mouse binding to the VC mode-line entry, Dan Nicolaescu, 2007/07/09
- Re: add a tooltip and a mouse binding to the VC mode-line entry, Richard Stallman, 2007/07/10
Re: add a tooltip and a mouse binding to the VC mode-line entry, Masatake YAMATO, 2007/07/04