branch (@code{vc-print-branch-log}).
@item B s
-Switch to a branch (@code{vc-retrieve-tag}). @xref{Switching Branches}.
+Switch to a branch (@code{vc-retrieve-tag}). @xref{Switching
+Branches}.
+
+@item d
+Delete the marked files, or the current file if no marks
+(@code{vc-dir-delete-files-no-vc)}. The files will not be marked as
+deleted in the version control system, so this function is mostly
+useful for unregistered files.
@end table
@cindex stashes in version control
print diffs and logs between the merge base (common ancestor) of two
given revisions.
+*** The new `d' command (`vc-dir-delete-files-no-vc') in `vc-dir-mode'
+buffers will delete the marked files (or if no files are marked, the
+file under point). This command does not notify the VC backend, and
+is mostly useful for unregistered files.
+
** Diff mode
+++
*** Hunks are now automatically refined by font-lock.
(define-key map [open]
'(menu-item "Open File" vc-dir-find-file
:help "Find the file on the current line"))
+ (define-key map [delete]
+ '(menu-item "Delete" vc-dir-delete-files-no-vc
+ :help "Delete the marked files"))
(define-key map [sepvcdet] '("--"))
;; FIXME: This needs a key binding. And maybe a better name
;; ("Insert" like PCL-CVS uses does not sound that great either)...
;; bound by `special-mode'.
;; Marking.
(define-key map "m" 'vc-dir-mark)
+ (define-key map "d" 'vc-dir-delete-files-no-vc)
(define-key map "M" 'vc-dir-mark-all-files)
(define-key map "u" 'vc-dir-unmark)
(define-key map "U" 'vc-dir-unmark-all-files)
(interactive "e")
(vc-dir-at-event e (vc-dir-mark-unmark 'vc-dir-toggle-mark-file)))
+(defun vc-dir-delete-files-no-vc ()
+ "Delete the marked files, or the current file if no marks.
+The files will not be marked as deleted in the version control
+system; see `vc-dir-delete-file'."
+ (interactive)
+ (map-y-or-n-p "Delete %s? "
+ #'delete-file
+ (or (vc-dir-marked-files)
+ (list (vc-dir-current-file))))
+ (revert-buffer))
+
(defun vc-dir-delete-file ()
- "Delete the marked files, or the current file if no marks."
+ "Delete the marked files, or the current file if no marks.
+The files will also be marked as deleted in the version control
+system."
(interactive)
(mapc 'vc-delete-file (or (vc-dir-marked-files)
(list (vc-dir-current-file)))))