Merge pull request #901 from toctan/trash

Respect `delete-by-moving-to-trash` with `prelude-delete-file-and-buffer`
This commit is contained in:
Bozhidar Batsov 2015-09-05 11:22:10 +03:00
commit 19cf3dc375

View file

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