;;; vc-dir.el --- Directory status display under VC -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2014 Free Software Foundation, Inc.
;; Author: Dan Nicolaescu <dann@ics.uci.edu>
;; Keywords: vc tools
(define-key map [register]
'(menu-item "Register" vc-register
:help "Register file set into the version control system"))
+ (define-key map [ignore]
+ '(menu-item "Ignore Current File" vc-dir-ignore
+ :help "Ignore the current file under current version control system"))
map)
"Menu for VC dir.")
;; VC commands
(define-key map "v" 'vc-next-action) ;; C-x v v
(define-key map "=" 'vc-diff) ;; C-x v =
+ (define-key map "D" 'vc-root-diff) ;; C-x v D
(define-key map "i" 'vc-register) ;; C-x v i
(define-key map "+" 'vc-update) ;; C-x v +
(define-key map "l" 'vc-print-log) ;; C-x v l
+ (define-key map "L" 'vc-print-root-log) ;; C-x v L
+ (define-key map "I" 'vc-log-incoming) ;; C-x v I
;; More confusing than helpful, probably
;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark.
;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer
(define-key map "Q" 'vc-dir-query-replace-regexp)
(define-key map (kbd "M-s a C-s") 'vc-dir-isearch)
(define-key map (kbd "M-s a M-C-s") 'vc-dir-isearch-regexp)
+ (define-key map "G" 'vc-dir-ignore)
;; Hook up the menu.
(define-key map [menu-bar vc-dir-mode]
(tags-query-replace from to delimited
'(mapcar 'car (vc-dir-marked-only-files-and-states))))
+(defun vc-dir-ignore ()
+ "Ignore the current file."
+ (interactive)
+ (vc-ignore (vc-dir-current-file)))
+
(defun vc-dir-current-file ()
(let ((node (ewoc-locate vc-ewoc)))
(unless node
(defvar use-vc-backend) ;; dynamically bound
-;; Autoload cookie needed by desktop.el.
-;;;###autoload
(define-derived-mode vc-dir-mode special-mode "VC dir"
"Major mode for VC directory buffers.
Marking/Unmarking key bindings and actions:
"Auxiliary information to be saved in desktop file."
(cons (desktop-file-name default-directory dirname) vc-dir-backend))
+(defvar desktop-missing-file-warning)
+
(defun vc-dir-restore-desktop-buffer (_filename _buffername misc-data)
"Restore a `vc-dir' buffer specified in a desktop file."
(let ((dir (car misc-data))