>From db0b059ae4f489d0c83b785b259eb965a181d0d0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 7 Mar 2018 00:29:38 -0800 Subject: [PATCH 2/2] maint: write-file-hooks -> before-save-hook write-file-hooks is obsolete since Emacs 22.1 (released June 2007) and it's time to use the recommended replacement. Problem reported by Glenn Morris in: https://lists.gnu.org/r/bug-gnulib/2018-03/msg00008.html * build-aux/announce-gen, build-aux/bootstrap: * build-aux/do-release-commit-and-tag, build-aux/gendocs.sh: * build-aux/git-version-gen, build-aux/gitlog-to-changelog: * build-aux/gnu-web-doc-update, build-aux/gnupload: * build-aux/move-if-change, build-aux/prefix-gnulib-mk: * build-aux/update-copyright, build-aux/useless-if-before-free: * build-aux/vc-list-files: Update hook usage for files where Gnulib is the canonical source. --- ChangeLog | 16 ++++++++++++++++ build-aux/announce-gen | 4 ++-- build-aux/bootstrap | 4 ++-- build-aux/do-release-commit-and-tag | 4 ++-- build-aux/gendocs.sh | 4 ++-- build-aux/git-version-gen | 4 ++-- build-aux/gitlog-to-changelog | 4 ++-- build-aux/gnu-web-doc-update | 4 ++-- build-aux/gnupload | 4 ++-- build-aux/move-if-change | 4 ++-- build-aux/prefix-gnulib-mk | 2 +- build-aux/update-copyright | 4 ++-- build-aux/useless-if-before-free | 4 ++-- build-aux/vc-list-files | 4 ++-- 14 files changed, 41 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f372df..e858e18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2018-03-07 Paul Eggert + + maint: write-file-hooks -> before-save-hook + write-file-hooks is obsolete since Emacs 22.1 (released June 2007) and + it's time to use the recommended replacement. + Problem reported by Glenn Morris in: + https://lists.gnu.org/r/bug-gnulib/2018-03/msg00008.html + * build-aux/announce-gen, build-aux/bootstrap: + * build-aux/do-release-commit-and-tag, build-aux/gendocs.sh: + * build-aux/git-version-gen, build-aux/gitlog-to-changelog: + * build-aux/gnu-web-doc-update, build-aux/gnupload: + * build-aux/move-if-change, build-aux/prefix-gnulib-mk: + * build-aux/update-copyright, build-aux/useless-if-before-free: + * build-aux/vc-list-files: + Update hook usage for files where Gnulib is the canonical source. + 2018-03-05 Paul Eggert binary-io: pacify gcc -Wunused-parameter diff --git a/build-aux/announce-gen b/build-aux/announce-gen index e566490..eeb9071 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"' if 0; # Generate a release announcement message. -my $VERSION = '2017-09-13 06:45'; # UTC +my $VERSION = '2018-03-07 03:46'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -549,7 +549,7 @@ EOF ## perl-label-offset: -2 ## perl-extra-newline-before-brace: t ## perl-merge-trailing-else: nil -## eval: (add-hook 'write-file-hooks 'time-stamp) +## eval: (add-hook 'before-save-hook 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC0" diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 25920e9..92be114 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2017-09-19.08; # UTC +scriptversion=2018-03-07.03; # UTC # Bootstrap this package from checked-out sources. @@ -1020,7 +1020,7 @@ bootstrap_epilogue echo "$0: done. Now you can run './configure'." # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/do-release-commit-and-tag b/build-aux/do-release-commit-and-tag index 18b3942..4472ff5 100755 --- a/build-aux/do-release-commit-and-tag +++ b/build-aux/do-release-commit-and-tag @@ -3,7 +3,7 @@ # controlled .prev-version file, automate the procedure by which we record # the date, release-type and version string in the NEWS file. That commit # will serve to identify the release, so apply a signed tag to it as well. -VERSION=2017-09-13.06 # UTC +VERSION=2018-03-07.03 # UTC # Note: this is a bash script (could be zsh or dash) @@ -171,7 +171,7 @@ git tag -s -m "$pkg $ver" v$ver HEAD || die 'git tag failed' # Local variables: # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "VERSION=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh index 33277d3..9d418b9 100755 --- a/build-aux/gendocs.sh +++ b/build-aux/gendocs.sh @@ -2,7 +2,7 @@ # gendocs.sh -- generate a GNU manual in many formats. This script is # mentioned in maintain.texi. See the help message below for usage details. -scriptversion=2018-01-01.00 +scriptversion=2018-03-06.19 # Copyright 2003-2018 Free Software Foundation, Inc. # @@ -497,7 +497,7 @@ $GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html" echo "Done, see $outdir/ subdirectory for new files." # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 8647b9e..6d073fc 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,6 +1,6 @@ #!/bin/sh # Print a version string. -scriptversion=2017-09-13.06; # UTC +scriptversion=2018-03-07.03; # UTC # Copyright (C) 2007-2018 Free Software Foundation, Inc. # @@ -219,7 +219,7 @@ fi printf %s "$v" # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index d8074aa..1e73f42 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"' if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2017-09-13 06:45'; # UTC +my $VERSION = '2018-03-07 03:47'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -491,7 +491,7 @@ sub git_dir_option($) # Local Variables: # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update index 12566c3..356c561 100755 --- a/build-aux/gnu-web-doc-update +++ b/build-aux/gnu-web-doc-update @@ -2,7 +2,7 @@ # Run this after each non-alpha release, to update the web documentation at # https://www.gnu.org/software/$pkg/manual/ -VERSION=2017-09-13.06; # UTC +VERSION=2018-03-07.03; # UTC # Copyright (C) 2009-2018 Free Software Foundation, Inc. @@ -202,7 +202,7 @@ $RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual ) # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "VERSION=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/gnupload b/build-aux/gnupload index b8d7385..2a0bfa3 100755 --- a/build-aux/gnupload +++ b/build-aux/gnupload @@ -1,7 +1,7 @@ #!/bin/sh # Sign files and upload them. -scriptversion=2017-09-13.06; # UTC +scriptversion=2018-03-07.03; # UTC # Copyright (C) 2004-2018 Free Software Foundation, Inc. # @@ -432,7 +432,7 @@ done exit 0 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/move-if-change b/build-aux/move-if-change index f159236..5da3eae 100755 --- a/build-aux/move-if-change +++ b/build-aux/move-if-change @@ -2,7 +2,7 @@ # Like mv $1 $2, but if the files are the same, just delete $1. # Status is zero if successful, nonzero otherwise. -VERSION='2017-09-13 06:45'; # UTC +VERSION='2018-03-07 03:47'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -75,7 +75,7 @@ else fi ## Local Variables: -## eval: (add-hook 'write-file-hooks 'time-stamp) +## eval: (add-hook 'before-save-hook 'time-stamp) ## time-stamp-start: "VERSION='" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC0" diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk index 62caca8..67b723f 100755 --- a/build-aux/prefix-gnulib-mk +++ b/build-aux/prefix-gnulib-mk @@ -230,7 +230,7 @@ sub process ($) ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 -## eval: (add-hook 'write-file-hooks 'time-stamp) +## eval: (add-hook 'before-save-hook 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC0" diff --git a/build-aux/update-copyright b/build-aux/update-copyright index 3bb26ab..f2fc97e 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"' if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2018-01-04.14:48'; # UTC +my $VERSION = '2018-03-07.03:47'; # UTC # Copyright (C) 2009-2018 Free Software Foundation, Inc. # @@ -269,7 +269,7 @@ else # coding: utf-8 # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free index 9325d07..2d4d13f 100755 --- a/build-aux/useless-if-before-free +++ b/build-aux/useless-if-before-free @@ -4,7 +4,7 @@ eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"' # Detect instances of "if (p) free (p);". # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. -my $VERSION = '2017-09-13 06:45'; # UTC +my $VERSION = '2018-03-07 03:47'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -202,7 +202,7 @@ EOF ## Local Variables: ## mode: perl ## indent-tabs-mode: nil -## eval: (add-hook 'write-file-hooks 'time-stamp) +## eval: (add-hook 'before-save-hook 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC0" diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index 567154d..12f191b 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -2,7 +2,7 @@ # List version-controlled file names. # Print a version string. -scriptversion=2017-09-13.06; # UTC +scriptversion=2018-03-07.03; # UTC # Copyright (C) 2006-2018 Free Software Foundation, Inc. @@ -105,7 +105,7 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" -- 2.7.4