Skip to content

Instantly share code, notes, and snippets.

@tzz
Created April 19, 2016 00:15
Show Gist options
  • Save tzz/2598d84c4bc3ece66c3d5933a4379844 to your computer and use it in GitHub Desktop.
Save tzz/2598d84c4bc3ece66c3d5933a4379844 to your computer and use it in GitHub Desktop.
(defun save-all-buffers ()
"Unconditionally save all modified buffers."
(interactive)
(save-some-buffers 1)
(message "All buffers saved"))
(add-hook 'focus-out-hook 'save-all-buffers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment