Subject: bug#12769: 24.2; Files won't save on Macintosh/Mountain Lion

From: Stefan Monnier <[email-masked]>
Date: Wed, 31 Oct 2012 12:09:36 -0400

> A quick follow up.  Thanks to your input, I've rewritten the code, and it seems to do everything that I need it to do in 24.2.
> (add-hook 'write-file-hooks 
>   (lambda ()
>     (delete-trailing-whitespace)
>     (if (not indent-tabs-mode)
>       (untabify (point-min) (point-max)))
>     nil))

BTW, try C-h v write-file-hooks: you'll see it's been obsolete for
a while.

        Stefan