[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird bogosity relating to "copyright-update"
From: |
Stefan Monnier |
Subject: |
Re: weird bogosity relating to "copyright-update" |
Date: |
Mon, 07 Feb 2011 10:57:39 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> So... what change tickled this problem, and what's the right way to fix
>> it...? It doesn't seem a bad thing that Gnus is doing that let-binding
>> (you probably _don't_ want your mail FCCs to get copyright-updated), but
>> it's clearly bad that the let-binding is screwing things up...
> Yes, that seems like the wrong way to do this. If nnfolder wants to
> let-bind `copyright-updated', it also has to require copyright.
Indeed.
> But I think it would make more sense for nnfolder to bind
> `write-file-hooks' to nil, wouldn't it?
Actually, the recommended hook to use for copyright-update nowadays is
not write-file-hooks (which has been marked obsolete since Emacs-22.1)
but before-save-hook.
So it should maybe bind write-file-functions, write-contents-functions,
and before-save-hook, or and maybe after-save-hook as well.
Or maybe a better way would be to use write-region rather than save-buffer.
Stefan