Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-07 Thread Paul Eggert

On 03/07/2018 03:58 PM, Karl Berry wrote:

>    doc/maintain.texi.
>
> bug-standa...@gnu.org

Whaddya know, it turns out that I have the bits to do bug-standards 
after all; I'd forgotten about that. I installed a patch and propagated 
it into Gnulib.



 build-aux/texinfo.tex

bug-texi...@gnu.org


Thanks, I sent in a bug report about this to bug-texinfo, here:

https://lists.gnu.org/r/bug-texinfo/2018-03/msg00022.html

I think build-aux/texinfo.tex is the only remaining Gnulib source file 
that uses the obsolescent form.





Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-07 Thread Karl Berry
build-aux/texinfo.tex 

bug-texi...@gnu.org

and doc/maintain.texi. 

bug-standa...@gnu.org

I think Karl Berry can do those so I'll CC: him.

Technically I can still commit to the repos, but I think it would be
better if I didn't step in.

(I can't help but remark that backward compatibility breakage in Emacs
to the extent of having to edit source files that have been stable for
decades wrt this feature seems very sad.  Oh well.)  --best, karl.



Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-07 Thread Ben Elliston
On Wed, Mar 07, 2018 at 11:46:56AM -0800, Paul Eggert wrote:

> These are all upstream from Gnulib. For the first two, I'm attaching
> a proposed patch and CC'ing this to config-patches. For the last
> one, I fixed the upstream and propagated it to Gnulib.

Applied.

Ben


signature.asc
Description: PGP signature


Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-07 Thread Paul Eggert

On 03/07/2018 09:32 AM, Glenn Morris wrote:

Thanks for replacing the obsolete forms.
A few files were already using write-file-functions; I don't know if
you want to change those to before-save-hook, for consistency.
 From today's gnulib:

build-aux/config.sub
build-aux/config.guess
doc/standards.texi


These are all upstream from Gnulib. For the first two, I'm attaching a 
proposed patch and CC'ing this to config-patches. For the last one, I 
fixed the upstream and propagated it to Gnulib.


diff --git a/config.guess b/config.guess
index 8ca6a44..a04c5a7 100755
--- a/config.guess
+++ b/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2018-03-01'
+timestamp='2018-03-07'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1469,7 +1469,7 @@ EOF
 exit 1
 
 # Local variables:
-# eval: (add-hook 'write-file-functions 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
diff --git a/config.sub b/config.sub
index 0b218ed..3970ff9 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2018-02-28'
+timestamp='2018-03-07'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1794,7 +1794,7 @@ echo "$basic_machine$os"
 exit
 
 # Local variables:
-# eval: (add-hook 'write-file-functions 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"


Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-07 Thread Glenn Morris

Thanks for replacing the obsolete forms.
A few files were already using write-file-functions; I don't know if
you want to change those to before-save-hook, for consistency.
>From today's gnulib:

build-aux/config.sub
build-aux/config.guess
doc/standards.texi



Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-07 Thread Paul Eggert

Glenn Morris wrote:

Please replace "write-file-hooks" with "before-save-hook".


I did that in all files maintained in Gnulib, along with files we're copying 
from Automake (I updated Automake), by installing the attached. Two files remain 
that I don't believe I have commit privileges on upstream: build-aux/texinfo.tex 
and doc/maintain.texi. I think Karl Berry can do those so I'll CC: him.
>From b98b09e24686fb05983ddc6156517d398d407957 Mon Sep 17 00:00:00 2001
From: Paul Eggert 
Date: Tue, 6 Mar 2018 20:29:14 -0800
Subject: [PATCH 1/2] autoupdate

---
 build-aux/ar-lib| 2 +-
 build-aux/compile   | 4 ++--
 build-aux/depcomp   | 4 ++--
 build-aux/install-sh| 4 ++--
 build-aux/mdate-sh  | 4 ++--
 build-aux/mkinstalldirs | 4 ++--
 build-aux/texinfo.tex   | 4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/build-aux/ar-lib b/build-aux/ar-lib
index 245e6f3..0baa4f6 100755
--- a/build-aux/ar-lib
+++ b/build-aux/ar-lib
@@ -4,7 +4,7 @@
 me=ar-lib
 scriptversion=2012-03-01.08; # UTC
 
-# Copyright (C) 2010-2017 Free Software Foundation, Inc.
+# Copyright (C) 2010-2018 Free Software Foundation, Inc.
 # Written by Peter Rosin .
 #
 # This program is free software; you can redistribute it and/or modify
diff --git a/build-aux/compile b/build-aux/compile
index 0bb9d0f..99e5052 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2017-09-16.17; # UTC
+scriptversion=2018-03-07.03; # UTC
 
 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 # Written by Tom Tromey .
@@ -340,7 +340,7 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# 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/depcomp b/build-aux/depcomp
index 49eb4bf..65cbf70 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2017-09-16.17; # UTC
+scriptversion=2018-03-07.03; # UTC
 
 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 
@@ -783,7 +783,7 @@ exit 0
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# 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/install-sh b/build-aux/install-sh
index ac159ce..5f3d36c 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2017-09-23.17; # UTC
+scriptversion=2018-03-07.03; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -501,7 +501,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"
diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh
index 21247c5..8c7a590 100755
--- a/build-aux/mdate-sh
+++ b/build-aux/mdate-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2017-09-22.02; # UTC
+scriptversion=2018-03-07.03; # UTC
 
 # Copyright (C) 1995-2018 Free Software Foundation, Inc.
 # written by Ulrich Drepper , June 1995
@@ -220,7 +220,7 @@ echo $day $month $year
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# 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/mkinstalldirs b/build-aux/mkinstalldirs
index a31ce6d..36aa909 100755
--- a/build-aux/mkinstalldirs
+++ b/build-aux/mkinstalldirs
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
 
 # Original author: Noah Friedman 
 # Created: 1993-05-16
@@ -154,7 +154,7 @@ exit $errstatus
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# 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/texinfo.tex b/build-aux/texinfo.tex
index 0af2f09..ac5c1d9 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, 

Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-07 Thread Paul Eggert

Glenn Morris wrote:

I assumed any utility to keeping the time stamps
update was solely for edits in gnulib itself.


I assumed otherwise, in that if a change was made downstream by hand they'd want 
the timestamps to be updated.


By the way, I would rather remove these timestamps as they are causing 
maintenance issues. They may have been worthwhile in the 1980s before 
version-control was widespread, but nowadays they are more trouble than they're 
worth, in my experience.




Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-06 Thread Glenn Morris

Paul Eggert wrote (on Tue, 6 Mar 2018 at 19:43 -0800):

> That would make sense if we assume that Gnulib source files live in a 
> directory 
> controlled by the .dir-locals.el file. However, Gnulib is designed to copy 
> source files hither and yon, and it'd be a pain to arrange to update the 
> .dir-locals.el files (if any) appropriate for the hither-and-yon copies.

Why would you need to copy a dir-locals file outside the gnulib repo?
You can't force your downstreams to use a particular editor to make
any local changes. Any changes they did make would show up via vcs, in
the normal way. I assumed any utility to keeping the time stamps
update was solely for edits in gnulib itself.




Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-06 Thread Paul Eggert

Glenn Morris wrote:

PS If you drop Emacs < 23.1 (released July 2009), you can switch to a
single .dir-locals.el file (rather than having the same stanza in
multiple source files)


That would make sense if we assume that Gnulib source files live in a directory 
controlled by the .dir-locals.el file. However, Gnulib is designed to copy 
source files hither and yon, and it'd be a pain to arrange to update the 
.dir-locals.el files (if any) appropriate for the hither-and-yon copies.




Re: Replace use of obsolete Emacs feature "write-file-hooks"

2018-03-06 Thread Glenn Morris

PS If you drop Emacs < 23.1 (released July 2009), you can switch to a
single .dir-locals.el file (rather than having the same stanza in
multiple source files), as someone pointed out in

http://lists.gnu.org/r/bug-gnulib/2011-02/msg00282.html