emacs-devel
[Top][All Lists]
Advanced

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

Re: Defcustom write-file-functions and write-contents-functions?


From: Miles Bader
Subject: Re: Defcustom write-file-functions and write-contents-functions?
Date: Sun, 4 Jan 2004 19:31:31 -0500
User-agent: Mutt/1.3.28i

On Sun, Jan 04, 2004 at 06:14:20PM -0600, Luc Teirlinck wrote:
>    Please don't.  There are already plenty of hooks run at that place
>    and the code is hairy enough as it is.
> 
> It would add a line to the code, but it would not increase complexity.
> Complexity is not measured in number of lines of code.

It adds complexity because the number of `non local' things you have to worry
about to determine what happens when you save a file has increased.  I'd
guess that man people have been surprised by write-file-functions, but by now
know to look there if something funny is happening when they save a file.
If you add _another_ hook, then they have to repeat the process (be confused,
whoa, write-file-functions is nil, be _really_ confused, ..., eventually
realize there's now before-save-hook too, be enlightened).

That said, maybe it's worth it, maybe it's not -- maybe simply being very
careful about verbosely documenting things would be enough -- but geez, give
Stefan some credit!

-Miles
-- 
"1971 pickup truck; will trade for guns"




reply via email to

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