On 02/22/2011 04:24 PM, Glenn Morris wrote: > contain stuff like this: > > # Local Variables: > # mode: shell-script > # sh-indentation: 2 > # eval: (add-hook 'write-file-hooks 'time-stamp) > # time-stamp-start: "scriptversion=" > # time-stamp-format: "%:y-%02m-%02d.%02H" > # time-stamp-time-zone: "UTC" > # time-stamp-end: "; # UTC" > # End: > > Firstly, a minor point. write-file-hooks is obsolete since Emacs 22.1, > replaced by write-file-functions. (Actually, the Emacs documentation > suggests using before-save-hook for time-stamping.)
And what's the portable fallback, for files that might be maintained on older emacs? > > Is it really necessary to have this setting in the files? Do you have a suggestion for an alternate way to ensure that the timestamps are consistently updated when edited in their primary upstream repo, without the use of the eval? For example, would creating a .dir-locals.el in the same repository do the trick? And, showing how little I know about .dir-locals.el, what would its contents have to be to take the place of the eval? I'd welcome such a patch (well, probably multiple patches, since upstream varies for some of the files in question), since I also don't like the question every time I open the file, but do want the automatic timestamp update to work any time I edit one of those files in their primary upstream location. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature