]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/vc-dir.el
Merge from emacs-23
[gnu-emacs] / lisp / vc / vc-dir.el
similarity index 97%
rename from lisp/vc-dir.el
rename to lisp/vc/vc-dir.el
index 1fee373c0073fa231280e7ad593e9a7e4e69a2b4..36e696772298ccc569ff9685e02ebb139fbb33b4 100644 (file)
@@ -4,7 +4,8 @@
 ;;   Free Software Foundation, Inc.
 
 ;; Author:   Dan Nicolaescu <dann@ics.uci.edu>
-;; Keywords: tools
+;; Keywords: vc tools
+;; Package: vc
 
 ;; This file is part of GNU Emacs.
 
@@ -195,7 +196,7 @@ See `run-hooks'."
       '(menu-item "Show Incoming Log" vc-log-incoming
                  :help "Show a log of changes that will be received with a pull operation"))
     (define-key map [log]
-      '(menu-item "Show history" vc-print-log
+      '(menu-item "Show History" vc-print-log
                  :help "List the change log of the current file set in a window"))
     (define-key map [rlog]
       '(menu-item "Show Top of the Tree History " vc-print-root-log
@@ -306,29 +307,36 @@ If BODY uses EVENT, it should be a variable,
 
 (defvar vc-dir-tool-bar-map
   (let ((map (make-sparse-keymap)))
-    (tool-bar-local-item-from-menu 'vc-dir-find-file "open"
-                                  map vc-dir-mode-map)
-    (tool-bar-local-item "bookmark_add"
-                        'vc-dir-toggle-mark 'vc-dir-toggle-mark map
-                        :help "Toggle mark on current item")
-    (tool-bar-local-item-from-menu 'vc-dir-previous-line "left-arrow"
-                                  map vc-dir-mode-map
-                                  :rtl "right-arrow")
-    (tool-bar-local-item-from-menu 'vc-dir-next-line "right-arrow"
-                                  map vc-dir-mode-map
-                                  :rtl "left-arrow")
+    (tool-bar-local-item-from-menu 'find-file "new" map nil
+                                  :label "New File" :vert-only t)
+    (tool-bar-local-item-from-menu 'menu-find-file-existing "open" map nil
+                                  :label "Open" :vert-only t)
+    (tool-bar-local-item-from-menu 'dired "diropen" map nil
+                                  :vert-only t)
+    (tool-bar-local-item-from-menu 'quit-window "close" map vc-dir-mode-map
+                                  :vert-only t)
+    (tool-bar-local-item-from-menu 'vc-next-action "saveas" map
+                                  vc-dir-mode-map :label "Commit")
     (tool-bar-local-item-from-menu 'vc-print-log "info"
-                                  map vc-dir-mode-map)
-    (tool-bar-local-item-from-menu 'revert-buffer "refresh"
-                                  map vc-dir-mode-map)
-    (tool-bar-local-item-from-menu 'nonincremental-search-forward
-                                  "search" map)
-    (tool-bar-local-item-from-menu 'vc-dir-query-replace-regexp
-                                  "search-replace" map vc-dir-mode-map)
+                                  map vc-dir-mode-map
+                                  :label "Log")
+    (define-key-after map [separator-1] menu-bar-separator)
     (tool-bar-local-item-from-menu 'vc-dir-kill-dir-status-process "cancel"
-                                  map vc-dir-mode-map)
-    (tool-bar-local-item-from-menu 'quit-window "exit"
-                                  map vc-dir-mode-map)
+                                  map vc-dir-mode-map
+                                  :label "Stop" :vert-only t)
+    (tool-bar-local-item-from-menu 'revert-buffer "refresh"
+                                  map vc-dir-mode-map :vert-only t)
+    (define-key-after map [separator-2] menu-bar-separator)
+    (tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [cut])
+                                  "cut" map nil :vert-only t)
+    (tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [copy])
+                                  "copy" map nil :vert-only t)
+    (tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [paste])
+                                  "paste" map nil :vert-only t)
+    (define-key-after map [separator-3] menu-bar-separator)
+    (tool-bar-local-item-from-menu 'isearch-forward
+                                  "search" map nil
+                                  :label "Search" :vert-only t)
     map))
 
 (defun vc-dir-node-directory (node)
@@ -961,6 +969,7 @@ the *vc-dir* buffer.
     ;; Make sure that if the directory buffer is killed, the update
     ;; process running in the background is also killed.
     (add-hook 'kill-buffer-query-functions 'vc-dir-kill-query nil t)
+    (hack-dir-local-variables-non-file-buffer)
     (vc-dir-refresh)))
 
 (defun vc-dir-headers (backend dir)