From: Stefan Monnier Date: Mon, 12 Apr 2010 19:14:16 +0000 (-0400) Subject: (vc-dir-kill-line): New command. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~529 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a544e7c143dc0db6b3f7a37a8fb51eec083f3479;p=emacs.git (vc-dir-kill-line): New command. (vc-dir-mode-map): Bind it to C-k. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3ce0bb91c64..05ecc80f7eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-04-12 Stefan Monnier + * 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. diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el index 1eaec28e8be..4b95321d366 100644 --- a/lisp/vc-dir.el +++ b/lisp/vc-dir.el @@ -263,6 +263,7 @@ See `run-hooks'." (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 @@ outside of VC) and one wants to do some operation on it." (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))