bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21492: 25.0.50: Make untabify work nicely with write-file-functions


From: Kaushal Modi
Subject: bug#21492: 25.0.50: Make untabify work nicely with write-file-functions
Date: Wed, 16 Sep 2015 22:54:56 -0400

Thanks.

Yes, I had then ended up replacing all my write-file-functions add-hooks with before-save-hook: https://github.com/kaushalmodi/.emacs.d/commit/d89d6333f0978d7fda4af412ecaa5089812b7e26

--
Kaushal Modi

On Sep 16, 2015 9:54 PM, "Stefan Monnier" <monnier@iro.umontreal.ca> wrote:
> I also have now started using before-save-hook instead of
> write-file-functions where I don't care about the return values of the
> functions added to the hook.

BTW, the use of before-save-hook is not just so you don't have to care
about the return value.  It's also because some functions on
write-file-functions may not be run at all (if some earlier function
returns non-nil because it took care of performing the write).

So even adding a "nil" at the of your function doesn't make it right to
add it to write-file-functions.


        Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]