changeset 82191:b8ea0870f6de

(vc-dired-mode): Added a menu for VC related operation. Use backend name as the menu label Suggested by David Kastrup.
author Masatake YAMATO <jet@gyve.org>
date Sat, 28 Jul 2007 18:11:25 +0000
parents 3b2cbc59143e
children 5800574abbcb
files lisp/ChangeLog lisp/vc.el
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jul 28 18:00:35 2007 +0000
+++ b/lisp/ChangeLog	Sat Jul 28 18:11:25 2007 +0000
@@ -1,3 +1,9 @@
+2007-07-28  Masatake YAMATO  <jet@gyve.org>
+
+	* vc.el (vc-dired-mode): Added a menu for VC related
+	operation. Use backend name as the menu label Suggested by
+	David Kastrup.
+
 2007-07-28  Alan Mackenzie  <acm@muc.de>
 
 	Fix problem with modes derived from CC Mode:
--- a/lisp/vc.el	Sat Jul 28 18:00:35 2007 +0000
+++ b/lisp/vc.el	Sat Jul 28 18:11:25 2007 +0000
@@ -2233,8 +2233,13 @@
        (set (make-local-variable 'dired-actual-switches)
             vc-dired-switches))
   (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display)
-  (setq mode-name (concat mode-name (symbol-name (vc-responsible-backend 
-						  default-directory))))
+  (let ((backend-name (symbol-name (vc-responsible-backend
+				    default-directory))))
+    (setq mode-name (concat mode-name backend-name))
+    ;; Add menu after `vc-dired-mode-map' has `dired-mode-map' as the parent.
+    (let ((vc-dire-menu-map (copy-keymap vc-menu-map)))
+      (define-key-after (lookup-key vc-dired-mode-map [menu-bar]) [vc] 
+	(cons backend-name vc-dire-menu-map) 'subdir)))
   (setq vc-dired-mode t))
 
 (defun vc-dired-toggle-terse-mode ()