Subject: Re: bug#4554: local variable for updating the time stamp on save

From: Juri Linkov <[email-masked]>
Date: Wed, 30 Sep 2009 02:20:16 +0300

>> > The defcustom `safe-local-eval-forms' contains
>> >     '((add-hook 'write-file-hooks 'time-stamp))
>> > but the documentation suggests using
>> >     (add-hook 'before-save-hook 'time-stamp)
>> > This patch adds the recommended form to `safe-local-eval-forms' as well:
>>
>> Feel free to install this patch, thanks,
>
> I went ahead and installed.

Thanks, but I see something strange in CVS now,
`safe-local-eval-forms' contains by default:

1. `write-file-functions'.  Yes, I know that it replaces the obsolete
   `write-file-hooks'.  But users might have already `write-file-hooks'
   in local variables of their files, so I think we should check for both.

2. `before-save-hooks'.  Is this a typo?  I think it should be
   `before-save-hook'.

So I propose the following default:

  '((add-hook 'write-file-functions 'time-stamp)
    (add-hook 'write-file-hooks 'time-stamp)
    (add-hook 'before-save-hook 'time-stamp))

-- 
Juri Linkov
http://www.jurta.org/emacs/