all repos — archive/dotfiles @ f501f4d4998d6791382a3590a5423cb037c6494f

Superseded by nixfiles

Emacs: delete-current-buffer-file: remove vc check
Alan Pearce alan@alanpearce.co.uk
Fri, 18 Apr 2014 21:44:27 +0100
commit

f501f4d4998d6791382a3590a5423cb037c6494f

parent

13785c1eb7c0b85f171e6eb89b6b7bb4f47c6ade

1 files changed, 3 insertions(+), 5 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -392,11 +392,9 @@ (buffer (current-buffer)))     (if (not (and filename (file-exists-p filename)))
         (ido-kill-buffer)
       (when (yes-or-no-p "Are you sure you want to remove this file? ")
-        (if (vc-backend filename)
-            (vc-delete-file filename)
-          (delete-file filename)
-          (kill-buffer buffer)
-          (message "File '%s' successfully removed" filename))))))
+        (delete-file filename)
+        (kill-buffer buffer)
+        (message "File '%s' successfully removed" filename)))))
 
 (use-package recentf
   :init (progn (setq recentf-auto-cleanup 'never