[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Emacs local variables sections in files; time-stamping
From: |
Glenn Morris |
Subject: |
Emacs local variables sections in files; time-stamping |
Date: |
Tue, 22 Feb 2011 18:24:40 -0500 |
Hi,
I'm not sure if I should be reporting this to gnulib or to the various
upstreams from which the relevant files derive; but it seems to be a
common feature...
We have various files in Emacs that are synced from gnulib now.
Several of them:
compile, config.guess, config.sub, depcomp, doc/misc/texinfo.tex
install-sh, missing, mkinstalldirs
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.)
My main point is, having this stanza in the files is extremely
annoying. Because `eval' is potentially risky, every time I open one
of these files in Emacs, I get a prompt:
The local variables list in config.sub
contains values that may not be safe (*).
Do you want to apply it? [...]
* eval : (add-hook (quote write-file-hooks) (quote time-stamp))
I generally answer `n' anyway, because I don't want to accidentally
bump the time-stamp.
Is it really necessary to have this setting in the files?
- Emacs local variables sections in files; time-stamping,
Glenn Morris <=