bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] maint: add coding cookies to non-ASCII sources


From: Paul Eggert
Subject: [PATCH] maint: add coding cookies to non-ASCII sources
Date: Thu, 24 Sep 2015 13:25:56 -0700

Otherwise, Emacs might do the wrong thing if run in an
he_IL.ISO-8859-8 locale, which an Emacs developer does on occasion.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00966.html

Don't bother with test files, as they aren't copied to the Emacs
source directory.  If this problem affects test files in some other
GNU project, we can add coding cookies to the non-ASCII test files
later.
---
 NEWS                               | 1 +
 doc/Makefile                       | 2 +-
 gnulib-tool                        | 2 +-
 lib/acl-internal.c                 | 2 +-
 lib/acl-internal.h                 | 2 +-
 lib/c-strtod.h                     | 2 +-
 lib/copy-acl.c                     | 2 +-
 lib/diacrit.c                      | 2 +-
 lib/diacrit.h                      | 2 +-
 lib/file-has-acl.c                 | 2 +-
 lib/fpucw.h                        | 2 +-
 lib/gen-uni-tables.c               | 2 +-
 lib/get-permissions.c              | 2 +-
 lib/gl_list.h                      | 2 +-
 lib/gl_openssl.h                   | 2 +-
 lib/ignore-value.h                 | 2 +-
 lib/mbscasestr.c                   | 2 +-
 lib/mbsstr.c                       | 2 +-
 lib/memxor.c                       | 2 +-
 lib/pipe-filter.h                  | 2 +-
 lib/propername.h                   | 2 +-
 lib/qcopy-acl.c                    | 2 +-
 lib/set-permissions.c              | 2 +-
 lib/setlocale.c                    | 2 +-
 lib/strverscmp.c                   | 2 +-
 lib/trigl.c                        | 2 +-
 lib/trigl.h                        | 2 +-
 lib/unicase/locale-languages.gperf | 7 +++++++
 lib/unicase/u-ct-totitle.h         | 6 ++++++
 lib/unistr/u-strstr.h              | 2 +-
 lib/uniwbrk/u-wordbreaks.h         | 2 +-
 lib/uniwbrk/wbrktable.c            | 2 +-
 m4/fpieee.m4                       | 2 +-
 m4/mbrlen.m4                       | 2 +-
 m4/mbrtowc.m4                      | 2 +-
 modules/passfd                     | 4 ++++
 modules/timer-time                 | 4 ++++
 users.txt                          | 1 +
 38 files changed, 55 insertions(+), 32 deletions(-)

diff --git a/NEWS b/NEWS
index b54a992..55f60fd 100644
--- a/NEWS
+++ b/NEWS
@@ -727,6 +727,7 @@ Date        Modules         Changes
 
 # This is for Emacs.
 # Local Variables:
+# coding: utf-8
 # indent-tabs-mode: nil
 # whitespace-check-buffer-indent: nil
 # End:
diff --git a/doc/Makefile b/doc/Makefile
index 9b1ac79..c4b4674 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,4 +1,4 @@
-# Makefile for gnulib doc.
+# Makefile for gnulib doc.  -*- coding: utf-8 -*-
 # Copyright (C) 2004, 2006-2015 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
diff --git a/gnulib-tool b/gnulib-tool
index cd224ad..c5c9ea6 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -4312,7 +4312,7 @@ func_import ()
             fi
           done
         else
-          # This loop has O(N²) worst-case run time.
+          # This loop has O(N**2) worst-case run time.
           for module in $cached_specified_modules; do
             to_remove=
             for m in $1; do
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index 1eaa671..c1b7017 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -1,4 +1,4 @@
-/* Test whether a file has a nontrivial access control list.
+/* Test whether a file has a nontrivial ACL.  -*- coding: utf-8 -*-
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 38a4ab2..560d146 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -1,4 +1,4 @@
-/* Internal implementation of access control lists.
+/* Internal implementation of access control lists.  -*- coding: utf-8 -*-
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
diff --git a/lib/c-strtod.h b/lib/c-strtod.h
index b80254d..0fc5a3c 100644
--- a/lib/c-strtod.h
+++ b/lib/c-strtod.h
@@ -1,4 +1,4 @@
-/* Convert string to double, using the C locale.
+/* Convert string to double, using the C locale.  -*- coding: utf-8 -*-
 
    Copyright (C) 2003-2004, 2009-2015 Free Software Foundation, Inc.
 
diff --git a/lib/copy-acl.c b/lib/copy-acl.c
index 49679eb..2be8c9e 100644
--- a/lib/copy-acl.c
+++ b/lib/copy-acl.c
@@ -1,4 +1,4 @@
-/* copy-acl.c - copy access control list from one file to another file
+/* Copy access control list from one file to file.  -*- coding: utf-8 -*-
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
diff --git a/lib/diacrit.c b/lib/diacrit.c
index dab6c97..0f18425 100644
--- a/lib/diacrit.c
+++ b/lib/diacrit.c
@@ -1,4 +1,4 @@
-/* Diacritics processing for a few character codes.
+/* Diacritics processing for a few character codes.  -*- coding: utf-8 -*-
 
    Copyright (C) 1990-1993, 2000, 2006, 2009-2015 Free Software Foundation,
    Inc.
diff --git a/lib/diacrit.h b/lib/diacrit.h
index b7f025f..e10a8a7 100644
--- a/lib/diacrit.h
+++ b/lib/diacrit.h
@@ -1,4 +1,4 @@
-/* Diacritics processing for a few character codes.
+/* Diacritics processing for a few character codes.  -*- coding: utf-8 -*-
    Copyright (C) 1990-1993, 2009-2015 Free Software Foundation, Inc.
    François Pinard <address@hidden>, 1988.
 
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index b78a879..6027c2e 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -1,4 +1,4 @@
-/* Test whether a file has a nontrivial access control list.
+/* Test whether a file has a nontrivial ACL.  -*- coding: utf-8 -*-
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
diff --git a/lib/fpucw.h b/lib/fpucw.h
index cedd5b4..b8cdf7e 100644
--- a/lib/fpucw.h
+++ b/lib/fpucw.h
@@ -1,4 +1,4 @@
-/* Manipulating the FPU control word.
+/* Manipulating the FPU control word.  -*- coding: utf-8 -*-
    Copyright (C) 2007-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2007.
 
diff --git a/lib/gen-uni-tables.c b/lib/gen-uni-tables.c
index 8c72092..a0b19ff 100644
--- a/lib/gen-uni-tables.c
+++ b/lib/gen-uni-tables.c
@@ -10171,8 +10171,8 @@ main (int argc, char * argv[])
 }
 
 /*
- * For Emacs M-x compile
  * Local Variables:
+ * coding: utf-8
  * compile-command: "\
  *   gcc -O -Wall gen-uni-tables.c -Iunictype -o gen-uni-tables &&      \\
  *   ./gen-uni-tables                                                   \\
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index 459513c..9dfb076 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -1,4 +1,4 @@
-/* get-permissions.c - get permissions of a file
+/* Get permissions of a file.  -*- coding: utf-8 -*-
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
diff --git a/lib/gl_list.h b/lib/gl_list.h
index 916f57f..a0c7d27 100644
--- a/lib/gl_list.h
+++ b/lib/gl_list.h
@@ -1,4 +1,4 @@
-/* Abstract sequential list data type.
+/* Abstract sequential list data type.  -*- coding: utf-8 -*-
    Copyright (C) 2006-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2006.
 
diff --git a/lib/gl_openssl.h b/lib/gl_openssl.h
index 697cd85..3900df6 100644
--- a/lib/gl_openssl.h
+++ b/lib/gl_openssl.h
@@ -1,4 +1,4 @@
-/* gl_openssl.h -- wrap openssl crypto hash routines in gnulib interface
+/* Wrap openssl crypto hash routines in gnulib interface.  -*- coding: utf-8 
-*-
 
    Copyright (C) 2013-2015 Free Software Foundation, Inc.
 
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
index 68521ed..2e3121f 100644
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -1,4 +1,4 @@
-/* ignore a function return without a compiler warning
+/* ignore a function return without a compiler warning.  -*- coding: utf-8 -*-
 
    Copyright (C) 2008-2015 Free Software Foundation, Inc.
 
diff --git a/lib/mbscasestr.c b/lib/mbscasestr.c
index a871310..089a4ba 100644
--- a/lib/mbscasestr.c
+++ b/lib/mbscasestr.c
@@ -1,4 +1,4 @@
-/* Case-insensitive searching in a string.
+/* Case-insensitive searching in a string.  -*- coding: utf-8 -*-
    Copyright (C) 2005-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2005.
 
diff --git a/lib/mbsstr.c b/lib/mbsstr.c
index a38f301..6d5239e 100644
--- a/lib/mbsstr.c
+++ b/lib/mbsstr.c
@@ -1,4 +1,4 @@
-/* Searching in a string.
+/* Searching in a string.  -*- coding: utf-8 -*-
    Copyright (C) 2005-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2005.
 
diff --git a/lib/memxor.c b/lib/memxor.c
index d78b5a4..9b6d023 100644
--- a/lib/memxor.c
+++ b/lib/memxor.c
@@ -1,4 +1,4 @@
-/* memxor.c -- perform binary exclusive OR operation of two memory blocks.
+/* Binary exclusive OR operation of two memory blocks.  -*- coding: utf-8 -*-
    Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/lib/pipe-filter.h b/lib/pipe-filter.h
index f98637b..ab60635 100644
--- a/lib/pipe-filter.h
+++ b/lib/pipe-filter.h
@@ -1,4 +1,4 @@
-/* Filtering of data through a subprocess.
+/* Filtering of data through a subprocess.  -*- coding: utf-8 -*-
    Copyright (C) 2009-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2009,
    and Paolo Bonzini <address@hidden>, 2009.
diff --git a/lib/propername.h b/lib/propername.h
index 9034d35..68e617e 100644
--- a/lib/propername.h
+++ b/lib/propername.h
@@ -1,4 +1,4 @@
-/* Localization of proper names.
+/* Localization of proper names.  -*- coding: utf-8 -*-
    Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2006.
 
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c
index c450742..9db9033 100644
--- a/lib/qcopy-acl.c
+++ b/lib/qcopy-acl.c
@@ -1,4 +1,4 @@
-/* copy-acl.c - copy access control list from one file to another file
+/* Copy access control list from one file to another.  -*- coding: utf-8 -*-
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 1aa5b49..8e6ecf3 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -1,4 +1,4 @@
-/* set-permissions.c - set permissions of a file
+/* Set permissions of a file.  -*- coding: utf-8 -*-
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
diff --git a/lib/setlocale.c b/lib/setlocale.c
index a7a1233..ed68ce2 100644
--- a/lib/setlocale.c
+++ b/lib/setlocale.c
@@ -1,4 +1,4 @@
-/* Set the current locale.
+/* Set the current locale.  -*- coding: utf-8 -*-
    Copyright (C) 2009, 2011-2015 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/strverscmp.c b/lib/strverscmp.c
index d5aaf48..18ef855 100644
--- a/lib/strverscmp.c
+++ b/lib/strverscmp.c
@@ -1,4 +1,4 @@
-/* Compare strings while treating digits characters numerically.
+/* Compare strings while treating digits numerically.  -*- coding: utf-8 -*-
    Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2015 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
diff --git a/lib/trigl.c b/lib/trigl.c
index 653aab8..8279ee7 100644
--- a/lib/trigl.c
+++ b/lib/trigl.c
@@ -1,4 +1,4 @@
-/* Quad-precision floating point argument reduction.
+/* Quad-precision floating point argument reduction.  -*- coding: utf-8 -*-
    Copyright (C) 1999, 2007, 2009-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <address@hidden>
diff --git a/lib/trigl.h b/lib/trigl.h
index 8b02a56..cfbc4c6 100644
--- a/lib/trigl.h
+++ b/lib/trigl.h
@@ -1,4 +1,4 @@
-/* Declarations for sinl, cosl, tanl internal functions
+/* Declarations for sinl, cosl, tanl internal functions.  -*- coding: utf-8 -*-
    Contributed by Paolo Bonzini
 
    Copyright 2002-2003, 2009-2015 Free Software Foundation, Inc.
diff --git a/lib/unicase/locale-languages.gperf 
b/lib/unicase/locale-languages.gperf
index da0d94e..fd566f9 100644
--- a/lib/unicase/locale-languages.gperf
+++ b/lib/unicase/locale-languages.gperf
@@ -268,3 +268,10 @@
 "zh", /* Chinese" */
 "zu", /* Zulu" */
 "zap", /* Zapotec" */
+%{
+/*
+ * Local Variables:
+ * coding: utf-8
+ * End:
+ */
+%}
diff --git a/lib/unicase/u-ct-totitle.h b/lib/unicase/u-ct-totitle.h
index 27f3736..cc21447 100644
--- a/lib/unicase/u-ct-totitle.h
+++ b/lib/unicase/u-ct-totitle.h
@@ -499,3 +499,9 @@ FUNC (const UNIT *s, size_t n,
     }
   return NULL;
 }
+
+/*
+ * Local Variables:
+ * coding: utf-8
+ * End:
+ */
diff --git a/lib/unistr/u-strstr.h b/lib/unistr/u-strstr.h
index 459215e..7dc3c2c 100644
--- a/lib/unistr/u-strstr.h
+++ b/lib/unistr/u-strstr.h
@@ -1,4 +1,4 @@
-/* Substring test for UTF-8/UTF-16/UTF-32 strings.
+/* Substring test for UTF-8/UTF-16/UTF-32 strings.  -*- coding: utf-8 -*-
    Copyright (C) 1999, 2002, 2006, 2010-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2002, 2005.
 
diff --git a/lib/uniwbrk/u-wordbreaks.h b/lib/uniwbrk/u-wordbreaks.h
index cdeab0b..7166a62 100644
--- a/lib/uniwbrk/u-wordbreaks.h
+++ b/lib/uniwbrk/u-wordbreaks.h
@@ -1,4 +1,4 @@
-/* Word breaks in UTF-8/UTF-16/UTF-32 strings.
+/* Word breaks in UTF-8/UTF-16/UTF-32 strings.  -*- coding: utf-8 -*-
    Copyright (C) 2009-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2009.
 
diff --git a/lib/uniwbrk/wbrktable.c b/lib/uniwbrk/wbrktable.c
index 18c10da..9679573 100644
--- a/lib/uniwbrk/wbrktable.c
+++ b/lib/uniwbrk/wbrktable.c
@@ -1,4 +1,4 @@
-/* Word break auxiliary table.
+/* Word break auxiliary table.  -*- coding: utf-8 -*-
    Copyright (C) 2009-2015 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2009.
 
diff --git a/m4/fpieee.m4 b/m4/fpieee.m4
index a4e4899..41c6033 100644
--- a/m4/fpieee.m4
+++ b/m4/fpieee.m4
@@ -1,4 +1,4 @@
-# fpieee.m4 serial 2
+# fpieee.m4 serial 2  -*- coding: utf-8 -*-
 dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/mbrlen.m4 b/m4/mbrlen.m4
index 9cde958..977a1ed 100644
--- a/m4/mbrlen.m4
+++ b/m4/mbrlen.m4
@@ -1,4 +1,4 @@
-# mbrlen.m4 serial 9
+# mbrlen.m4 serial 9  -*- coding: utf-8 -*-
 dnl Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index c0d751d..640579e 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 26
+# mbrtowc.m4 serial 26  -*- coding: utf-8 -*-
 dnl Copyright (C) 2001-2002, 2004-2005, 2008-2015 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
diff --git a/modules/passfd b/modules/passfd
index b3d8a3c..5e5c15f 100644
--- a/modules/passfd
+++ b/modules/passfd
@@ -28,3 +28,7 @@ LGPLv2+
 
 Maintainer:
 Bastien ROUCARIÈS
+
+Local Variables:
+coding: utf-8
+End:
diff --git a/modules/timer-time b/modules/timer-time
index 7bf8079..e3668c8 100644
--- a/modules/timer-time
+++ b/modules/timer-time
@@ -25,3 +25,7 @@ LGPLv2+
 
 Maintainer:
 Pádraig Brady, Paul Eggert, Jim Meyering
+
+Local Variables:
+coding: utf-8
+End:
diff --git a/users.txt b/users.txt
index 5160e15..7bfe0f2 100644
--- a/users.txt
+++ b/users.txt
@@ -118,6 +118,7 @@ with or without modifications, as long as this notice is 
preserved.
 
 Hey Emacs!
 Local Variables:
+coding: utf-8
 indent-tabs-mode: nil
 whitespace-check-buffer-indent: nil
 End:
-- 
2.1.0




reply via email to

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