Created
July 6, 2010 15:15
-
-
Save takumikinjo/465510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun delete-file-kill-buffer () | |
"Do delete-file function then kill-buffer function" | |
(interactive) | |
(let ((buf (current-buffer)) | |
(filepath (buffer-file-name (current-buffer)))) | |
(when (and | |
(not (null filepath)) | |
(file-exists-p filepath)) | |
(delete-file filepath)) | |
(kill-buffer buf))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment