]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/vc-dir.el
* lisp/vc/diff-mode.el (diff-refine-changed): Rename from
[gnu-emacs] / lisp / vc / vc-dir.el
index a9df6fdee8ded6f5de8be5e004b33a2262572dbc..5e074191577d86c04a7554f800f02245957fee61 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 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
@@ -215,6 +215,9 @@ See `run-hooks'."
     (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.")
 
@@ -237,9 +240,12 @@ See `run-hooks'."
     ;; 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
@@ -277,6 +283,7 @@ See `run-hooks'."
     (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]
@@ -789,6 +796,11 @@ with the command \\[tags-loop-continue]."
   (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
@@ -930,8 +942,6 @@ If it is a file, return the corresponding cons for the file itself."
 
 (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:
@@ -1301,6 +1311,8 @@ These are the commands available for use in the file status buffer:
   "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))