aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2007-07-11 18:37:38 +0000
committerDan Nicolaescu2007-07-11 18:37:38 +0000
commit82c4728d3b54cd752853c9a24c3bd7a1f507b68b (patch)
treeb9585cddd9284c3f9ae15362002aab068c7baafb
parent5bb7dfee821bc910d9848085b2ab6b78c70330f6 (diff)
downloademacs-82c4728d3b54cd752853c9a24c3bd7a1f507b68b.tar.gz
emacs-82c4728d3b54cd752853c9a24c3bd7a1f507b68b.zip
* vc-hooks.el (vc-default-mode-line-string): Add a mouse face,
mouse binding and a tooltip. * menu-bar.el (vc-menu-map): New defalias.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/menu-bar.el1
-rw-r--r--lisp/vc-hooks.el30
3 files changed, 30 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 07bdcb37dbc..2bf592f7acd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12007-07-11 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc-hooks.el (vc-default-mode-line-string): Add a mouse face,
4 mouse binding and a tooltip.
5
62007-07-11 Stefan Monnier <monnier@iro.umontreal.ca>
7
8 * menu-bar.el (vc-menu-map): New defalias.
9
12007-07-10 Jim Meyering <jim@meyering.net> (tiny change) 102007-07-10 Jim Meyering <jim@meyering.net> (tiny change)
2 11
3 * emacs-lisp/copyright.el (copyright-current-gpl-version): Set to 3. 12 * emacs-lisp/copyright.el (copyright-current-gpl-version): Set to 3.
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 7ad91dffa9f..5fae6382e28 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1161,6 +1161,7 @@ mail status in mode line"))
1161 '("--")) 1161 '("--"))
1162 1162
1163(defvar vc-menu-map (make-sparse-keymap "Version Control")) 1163(defvar vc-menu-map (make-sparse-keymap "Version Control"))
1164(defalias 'vc-menu-map vc-menu-map)
1164(define-key menu-bar-tools-menu [pcl-cvs] 1165(define-key menu-bar-tools-menu [pcl-cvs]
1165 '(menu-item "PCL-CVS" cvs-global-menu)) 1166 '(menu-item "PCL-CVS" cvs-global-menu))
1166(define-key menu-bar-tools-menu [vc] 1167(define-key menu-bar-tools-menu [vc]
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 89d271431fa..6ab95b333c6 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -742,17 +742,27 @@ Format:
742This function assumes that the file is registered." 742This function assumes that the file is registered."
743 (setq backend (symbol-name backend)) 743 (setq backend (symbol-name backend))
744 (let ((state (vc-state file)) 744 (let ((state (vc-state file))
745 (state-echo nil)
745 (rev (vc-workfile-version file))) 746 (rev (vc-workfile-version file)))
746 (cond ((or (eq state 'up-to-date) 747 (propertize
747 (eq state 'needs-patch)) 748 (cond ((or (eq state 'up-to-date)
748 (concat backend "-" rev)) 749 (eq state 'needs-patch))
749 ((stringp state) 750 (setq state-echo "Up to date file")
750 (concat backend ":" state ":" rev)) 751 (concat backend "-" rev))
751 (t 752 ((stringp state)
752 ;; Not just for the 'edited state, but also a fallback 753 (setq state-echo (concat "File locked by" state))
753 ;; for all other states. Think about different symbols 754 (concat backend ":" state ":" rev))
754 ;; for 'needs-patch and 'needs-merge. 755 (t
755 (concat backend ":" rev))))) 756 ;; Not just for the 'edited state, but also a fallback
757 ;; for all other states. Think about different symbols
758 ;; for 'needs-patch and 'needs-merge.
759 (setq state-echo "Edited file")
760 (concat backend ":" rev)))
761 'mouse-face 'mode-line-highlight
762 'local-map (let ((map (make-sparse-keymap)))
763 (define-key map [mode-line down-mouse-1] 'vc-menu-map) map)
764 'help-echo (concat state-echo " under the " backend
765 " version control system\nmouse-1: VC Menu"))))
756 766
757(defun vc-follow-link () 767(defun vc-follow-link ()
758 "If current buffer visits a symbolic link, visit the real file. 768 "If current buffer visits a symbolic link, visit the real file.