Skip to content

Instantly share code, notes, and snippets.

@rdsr
Created November 15, 2010 16:02
Show Gist options
  • Save rdsr/700507 to your computer and use it in GitHub Desktop.
Save rdsr/700507 to your computer and use it in GitHub Desktop.
(defun my-save-buffer (&optional args)
"removing trailing whitespaces and tabs while saving buffer"
(interactive "p")
(untabify (point-min) (point-max))
(whitespace-cleanup)
(save-buffer args))
(global-set-key "\C-x\C-s" 'my-save-buffer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment