Skip to content

Instantly share code, notes, and snippets.

@re5et
Created August 27, 2013 21:59
Show Gist options
  • Save re5et/6359724 to your computer and use it in GitHub Desktop.
Save re5et/6359724 to your computer and use it in GitHub Desktop.
Save a buffer, even if it hasn't been modified. I use this to touch / save a buffer when I want a test to run, etc.
(global-set-key (kbd "C-x C-s") 'force-save)
(defun force-save ()
(interactive)
(not-modified 1)
(save-buffer))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment