Skip to content

Instantly share code, notes, and snippets.

@rawsyntax
Created June 20, 2011 15:52
Show Gist options
  • Save rawsyntax/1035862 to your computer and use it in GitHub Desktop.
Save rawsyntax/1035862 to your computer and use it in GitHub Desktop.
(defun delete-file-and-buffer ()
"Deletes the current file and buffer, assumes file exists"
(interactive)
(delete-file buffer-file-name)
(kill-buffer (buffer-name)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment