changeset 107841:2cdeb4c70d45

(vc-dir-kill-line): New command. (vc-dir-mode-map): Bind it to C-k.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 12 Apr 2010 15:14:16 -0400
parents e84bec592536
children 992ffbd77e15 f61e8ca6c2fd
files lisp/ChangeLog lisp/vc-dir.el
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Apr 12 15:12:36 2010 -0400
+++ b/lisp/ChangeLog	Mon Apr 12 15:14:16 2010 -0400
@@ -1,5 +1,8 @@
 2010-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* vc-dir.el (vc-dir-kill-line): New command.
+	(vc-dir-mode-map): Bind it to C-k.
+
 	* bookmark.el (bookmark-insert-location): Handle a nil filename.
 
 	* woman.el: Add bookmark declarations to silence the compiler.
--- a/lisp/vc-dir.el	Mon Apr 12 15:12:36 2010 -0400
+++ b/lisp/vc-dir.el	Mon Apr 12 15:14:16 2010 -0400
@@ -263,6 +263,7 @@
     (define-key map [mouse-2] 'vc-dir-toggle-mark)
     (define-key map [follow-link] 'mouse-face)
     (define-key map "x" 'vc-dir-hide-up-to-date)
+    (define-key map [?\C-k] 'vc-dir-kill-line)
     (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired?
     (define-key map "Q" 'vc-dir-query-replace-regexp)
     (define-key map (kbd "M-s a C-s")   'vc-dir-isearch)
@@ -1088,6 +1089,13 @@
 	    (ewoc-delete vc-ewoc crt))
 	  (setq crt prev)))))
 
+(defun vc-dir-kill-line ()
+  "Remove the current line from display."
+  (interactive)
+  (let ((crt (ewoc-locate vc-ewoc))
+        (inhibit-read-only t))
+    (ewoc-delete vc-ewoc crt)))
+
 (defun vc-dir-printer (fileentry)
   (vc-call-backend vc-dir-backend 'dir-printer fileentry))