summaryrefslogtreecommitdiff
path: root/lisp/vc-cvs.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2007-07-22 19:04:11 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2007-07-22 19:04:11 +0000
commit3a12f9f8301f2243bc40791369aa4bde90f8bfe5 (patch)
treed24a21473e867a3ec179102dbd7389ca58847112 /lisp/vc-cvs.el
parent31c700022679c2893d951e403d406d00277e1a59 (diff)
downloademacs-3a12f9f8301f2243bc40791369aa4bde90f8bfe5.tar.gz
* vc-cvs.el (vc-cvs-mode-line-string): Add support for tooltips
for branches and new files. * vc-hooks.el (vc-default-mode-line-string): Move mouse-face and local-map handling ... (vc-mode-line): ... here. Improve handling of help-echo. * vc.el (mode-line-string): Document help-echo usage.
Diffstat (limited to 'lisp/vc-cvs.el')
-rw-r--r--lisp/vc-cvs.el27
1 files changed, 19 insertions, 8 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index 2daf2f72fba..452d9c16b19 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -258,14 +258,25 @@ See also variable `vc-cvs-sticky-date-format-string'."
Compared to the default implementation, this function does two things:
Handle the special case of a CVS file that is added but not yet
committed and support display of sticky tags."
- (let ((sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag))
- (string (if (string= (vc-workfile-version file) "0")
- ;; A file that is added but not yet committed.
- "CVS @@"
- (vc-default-mode-line-string 'CVS file))))
- (if (zerop (length sticky-tag))
- string
- (concat string "[" sticky-tag "]"))))
+ (let* ((sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag))
+ help-echo
+ (string
+ (if (string= (vc-workfile-version file) "0")
+ ;; A file that is added but not yet committed.
+ (progn
+ (setq help-echo "Added file (needs commit) under CVS")
+ "CVS @@")
+ (let ((def-ml (vc-default-mode-line-string 'CVS file)))
+ (setq help-echo
+ (get-text-property 0 'help-echo def-ml))
+ def-ml))))
+ (propertize
+ (if (zerop (length sticky-tag))
+ string
+ (setq help-echo (format "%s on the '%s' branch"
+ help-echo sticky-tag))
+ (concat string "[" sticky-tag "]"))
+ 'help-echo help-echo)))
(defun vc-cvs-dired-state-info (file)
"CVS-specific version of `vc-dired-state-info'."