[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

interactive write hook failure stops subsequent write hook?

From: Jim Meyering
Subject: interactive write hook failure stops subsequent write hook?
Date: Fri, 17 Dec 2004 09:40:00 +0100

It looks like a negative reply to the copyright-update
write hook makes it so no subsequent write hook runs.
I found that surprising.  Is it deliberate?

Here's the story:

I've just modified gnulib's install-sh file.
It has these lines at the end.

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

When I opened the buffer/file, it asked me if I wanted to eval that.
I replied `yes'.

I made some changes, then did C-x C-s to save it.
Because of this line in the file:

# Copyright (C) 1994 X Consortium

and the fact that I use this:

  (add-hook 'write-file-hooks 'copyright-update)

it prompted me about updating the copyright date.
I declined.  But apparently, since I declined, that
stopped emacs from running the *other* write hook,
the one that should have updated the `scriptversion'
stamp in the file.

If instead, I say `yes' to allow it to update the
copyright date, it also goes ahead and updates the
scriptversion variable to have the current date/hour.

This is using a snapshot from cvs built on Dec 14.

In GNU Emacs (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2004-12-14 on pi
configured using `configure '--disable-nls' 
'--prefix=/p/p/emacs-2004-12-14.08h21' 'CC=/usr/bin/gcc' 'CFLAGS=-O3 
-fstrict-aliasing' 'LDFLAGS=-s''

reply via email to

[Prev in Thread] Current Thread [Next in Thread]