Fix #4103: respect delete-by-moving-to-trash

When calling doom/delete-this-file
This commit is contained in:
Henrik Lissner 2020-10-15 23:12:21 -04:00
parent 8ba2b9eafa
commit b6fe731153
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -245,7 +245,7 @@ If FORCE-P, delete without confirmation."
(user-error "Aborted"))
(let ((buf (current-buffer)))
(unwind-protect
(progn (delete-file path) t)
(progn (delete-file path t) t)
(if (file-exists-p path)
(error "Failed to delete %S" short-path)
;; Ensures that windows displaying this buffer will be switched to