GNU bug report logs - #4554
local variable for updating the time stamp on save

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Thu, 24 Sep 2009 21:10:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 4554-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 4554-done <at> debbugs.gnu.org
Subject: Re: bug#4554: local variable for updating the time stamp on save
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/



This bug report was last modified 15 years and 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.