From 580628fc9880d6129c3e2a3fb129f3f572b074dc Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 18 Sep 2013 11:49:57 +0300 Subject: [PATCH] [Fix #391] Ask for confirmation before deleting a file that's not under VC --- core/prelude-core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index d622514..ec2ccba 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -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))))))