[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc.el,v
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc.el,v |
Date: |
Thu, 06 Mar 2008 10:58:49 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Jan Djärv <jhd> 08/03/06 10:58:49
Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.545
retrieving revision 1.546
diff -u -b -r1.545 -r1.546
--- vc.el 29 Feb 2008 22:09:56 -0000 1.545
+++ vc.el 6 Mar 2008 10:58:48 -0000 1.546
@@ -616,6 +616,8 @@
(require 'vc-hooks)
(require 'ring)
+(require 'tool-bar)
+
(eval-when-compile
(require 'cl)
(require 'compile)
@@ -2734,7 +2736,7 @@
:help "Move to the previous line and unmark the file"))
(define-key map [mark-all]
- '(menu-item "Marl All" vc-status-mark-all-files
+ '(menu-item "Mark All" vc-status-mark-all-files
:help "Mark all files that are in the same state as the
current file\
\nWith prefix argument mark all files"))
(define-key map [unmark]
@@ -2815,6 +2817,29 @@
(interactive "e")
(popup-menu vc-status-menu-map e))
+(defun vc-status-tool-bar-map ()
+ (if (display-graphic-p)
+ (let ((map (make-sparse-keymap)))
+ (tool-bar-local-item-from-menu 'vc-status-find-file "open"
+ map vc-status-mode-map)
+ (tool-bar-local-item "bookmark_add"
+ 'vc-status-toggle-mark 'vc-status-toggle-mark map
+ :help "Toggle mark on current item")
+ (tool-bar-local-item-from-menu 'vc-status-previous-line "left-arrow"
+ map vc-status-mode-map
+ :rtl "right-arrow")
+ (tool-bar-local-item-from-menu 'vc-status-next-line "right-arrow"
+ map vc-status-mode-map
+ :rtl "left-arrow")
+ (tool-bar-local-item-from-menu 'vc-status-refresh "refresh"
+ map vc-status-mode-map)
+ (tool-bar-local-item-from-menu 'nonincremental-search-forward
+ "search" map)
+ (tool-bar-local-item-from-menu 'bury-buffer "exit"
+ map vc-status-mode-map)
+ map)))
+
+
(defvar vc-status-process-buffer nil
"The buffer used for the asynchronous call that computes the VC status.")
@@ -2829,6 +2854,7 @@
(setq buffer-read-only t)
(set (make-local-variable 'vc-status-crt-marked) nil)
(use-local-map vc-status-mode-map)
+ (set (make-local-variable 'tool-bar-map) (vc-status-tool-bar-map))
(let ((buffer-read-only nil)
(backend (vc-responsible-backend default-directory))
entries)
@@ -3016,6 +3042,17 @@
t))
vc-status))))
+(defun vc-status-toggle-mark-file ()
+ (let* ((crt (ewoc-locate vc-status))
+ (file (ewoc-data crt)))
+ (if (vc-status-fileinfo->marked file)
+ (vc-status-unmark-file)
+ (vc-status-mark-file))))
+
+(defun vc-status-toggle-mark ()
+ (interactive)
+ (vc-status-mark-unmark 'toggle-mark-file))
+
(defun vc-status-register ()
"Register the marked files, or the current file if no marks."
(interactive)
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v,
Jan Djärv <=
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Jan Djärv, 2008/03/07
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Glenn Morris, 2008/03/10
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/17
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/03/18
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/20
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/21
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/03/21
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/22
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/23
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/23