[Fix #391] Ask for confirmation before deleting a file that's not under VC

This commit is contained in:
Bozhidar Batsov 2013-09-18 11:49:57 +03:00
parent fcff51fb41
commit 580628fc98

View file

@ -267,7 +267,7 @@ there's a region, all lines that region covers will be duplicated."
(when filename
(if (vc-backend filename)
(vc-delete-file filename)
(progn
(when (y-or-n-p (format "Are you sure you want to delete %s? " filename))
(delete-file filename)
(message "Deleted file %s" filename)
(kill-buffer))))))