emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 63a45e8 3/4: Merge branch 'emacs-26' of git.savan


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 63a45e8 3/4: Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26
Date: Sat, 30 Sep 2017 04:28:17 -0400 (EDT)

branch: emacs-26
commit 63a45e8837146636d7a6113955c8419980b0855b
Merge: f428757 3ab2f9b
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26
---
 ChangeLog.1                  |  2 +-
 ChangeLog.2                  |  2 +-
 ChangeLog.3                  |  2 +-
 admin/ChangeLog.1            |  2 +-
 admin/nt/README-UNDUMP.W32   |  2 +-
 admin/nt/README-ftp-server   |  4 ++--
 build-aux/install-sh         | 20 ++++++++++++++------
 config.bat                   |  2 +-
 doc/emacs/ChangeLog.1        |  4 ++--
 doc/lispintro/ChangeLog.1    |  2 +-
 doc/lispref/ChangeLog.1      |  2 +-
 doc/man/ChangeLog.1          |  2 +-
 doc/misc/ChangeLog.1         |  2 +-
 doc/misc/efaq.texi           |  2 +-
 etc/ChangeLog.1              |  2 +-
 etc/NEWS                     |  5 +++++
 etc/ORG-NEWS                 | 12 ++++++------
 leim/ChangeLog.1             |  2 +-
 lib-src/ChangeLog.1          |  2 +-
 lib-src/ntlib.c              |  2 +-
 lib-src/ntlib.h              |  2 +-
 lib/gnulib.mk.in             | 12 ++++++------
 lisp/ChangeLog.1             |  2 +-
 lisp/ChangeLog.10            |  2 +-
 lisp/ChangeLog.11            |  2 +-
 lisp/ChangeLog.12            |  2 +-
 lisp/ChangeLog.13            |  2 +-
 lisp/ChangeLog.14            |  2 +-
 lisp/ChangeLog.15            |  2 +-
 lisp/ChangeLog.16            |  2 +-
 lisp/ChangeLog.17            |  2 +-
 lisp/ChangeLog.2             |  2 +-
 lisp/ChangeLog.3             |  2 +-
 lisp/ChangeLog.4             |  2 +-
 lisp/ChangeLog.5             |  2 +-
 lisp/ChangeLog.6             |  2 +-
 lisp/ChangeLog.7             |  2 +-
 lisp/ChangeLog.8             |  2 +-
 lisp/ChangeLog.9             |  2 +-
 lisp/cedet/ChangeLog.1       |  2 +-
 lisp/dos-fns.el              |  2 +-
 lisp/dos-vars.el             |  2 +-
 lisp/dos-w32.el              |  2 +-
 lisp/erc/ChangeLog.1         |  2 +-
 lisp/erc/ChangeLog.2         |  2 +-
 lisp/gnus/ChangeLog.1        |  2 +-
 lisp/gnus/ChangeLog.2        |  2 +-
 lisp/gnus/ChangeLog.3        |  2 +-
 lisp/mh-e/ChangeLog.1        |  2 +-
 lisp/mh-e/ChangeLog.2        |  2 +-
 lisp/net/rcirc.el            |  2 +-
 lisp/org/ChangeLog.1         |  2 +-
 lisp/org/ob-sql.el           |  2 +-
 lisp/org/org-datetree.el     |  4 ++--
 lisp/org/org-table.el        |  2 +-
 lisp/progmodes/sh-script.el  |  2 +-
 lisp/thingatpt.el            |  2 +-
 lisp/url/ChangeLog.1         |  2 +-
 lwlib/ChangeLog.1            |  2 +-
 m4/mktime.m4                 |  6 +++++-
 m4/string_h.m4               | 12 ++++++------
 m4/sys_types_h.m4            |  4 ++--
 msdos/ChangeLog.1            |  2 +-
 msdos/INSTALL                |  2 +-
 msdos/README                 |  2 +-
 msdos/depfiles.bat           |  2 +-
 msdos/inttypes.h             |  2 +-
 msdos/mainmake.v2            |  2 +-
 nextstep/ChangeLog.1         |  2 +-
 nt/ChangeLog.1               |  2 +-
 nt/INSTALL                   |  2 +-
 nt/INSTALL.W64               |  2 +-
 nt/Makefile.in               |  2 +-
 nt/README                    |  4 ++--
 nt/README.W32                |  4 ++--
 nt/addpm.c                   |  2 +-
 nt/cmdproxy.c                |  2 +-
 nt/configure.bat             |  2 +-
 nt/ddeclient.c               |  2 +-
 nt/epaths.nt                 |  3 +--
 nt/gnulib-cfg.mk             |  2 +-
 nt/inc/grp.h                 |  2 +-
 nt/inc/inttypes.h            |  2 +-
 nt/inc/langinfo.h            |  2 +-
 nt/inc/ms-w32.h              |  2 +-
 nt/inc/nl_types.h            |  2 +-
 nt/inc/stdint.h              |  2 +-
 nt/inc/sys/resource.h        |  2 +-
 nt/inc/sys/socket.h          |  2 +-
 nt/inc/sys/stat.h            |  2 +-
 nt/inc/sys/wait.h            |  2 +-
 nt/preprep.c                 |  2 +-
 nt/runemacs.c                |  2 +-
 oldXMenu/ChangeLog.1         |  2 +-
 src/ChangeLog.1              |  2 +-
 src/ChangeLog.10             |  2 +-
 src/ChangeLog.11             |  2 +-
 src/ChangeLog.12             |  2 +-
 src/ChangeLog.13             |  2 +-
 src/ChangeLog.2              |  2 +-
 src/ChangeLog.3              |  2 +-
 src/ChangeLog.4              |  2 +-
 src/ChangeLog.5              |  2 +-
 src/ChangeLog.6              |  2 +-
 src/ChangeLog.7              |  2 +-
 src/ChangeLog.8              |  2 +-
 src/ChangeLog.9              |  2 +-
 src/cygw32.c                 |  2 +-
 src/cygw32.h                 |  2 +-
 src/dosfns.c                 |  2 +-
 src/dosfns.h                 |  2 +-
 src/gtkutil.c                |  4 ++++
 src/msdos.c                  |  2 +-
 src/msdos.h                  |  2 +-
 src/w16select.c              |  2 +-
 src/w32.c                    |  2 +-
 src/w32.h                    |  2 +-
 src/w32common.h              |  2 +-
 src/w32console.c             |  2 +-
 src/w32fns.c                 |  2 +-
 src/w32font.c                |  2 +-
 src/w32font.h                |  2 +-
 src/w32gui.h                 |  2 +-
 src/w32heap.c                |  2 +-
 src/w32heap.h                |  2 +-
 src/w32inevt.c               |  2 +-
 src/w32inevt.h               |  2 +-
 src/w32menu.c                |  2 +-
 src/w32notify.c              |  2 +-
 src/w32proc.c                |  2 +-
 src/w32reg.c                 |  2 +-
 src/w32select.c              |  2 +-
 src/w32select.h              |  2 +-
 src/w32term.c                | 33 +++++++++++++++++++++------------
 src/w32term.h                |  2 +-
 src/w32uniscribe.c           |  2 +-
 src/w32xfns.c                |  2 +-
 src/xterm.c                  | 40 ++++++++++++++++++++++++++++++++++------
 test/ChangeLog.1             |  2 +-
 test/lisp/net/tramp-tests.el |  2 +-
 140 files changed, 238 insertions(+), 181 deletions(-)

diff --git a/ChangeLog.1 b/ChangeLog.1
index eeb6da4..00c66d6 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -14715,4 +14715,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/ChangeLog.2 b/ChangeLog.2
index e789722..289cc2b 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -35802,4 +35802,4 @@ See ChangeLog.1 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/ChangeLog.3 b/ChangeLog.3
index 9e622ce..c74aede 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -22619,4 +22619,4 @@ See ChangeLog.1 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/admin/ChangeLog.1 b/admin/ChangeLog.1
index b1aaee7..bc3dba7 100644
--- a/admin/ChangeLog.1
+++ b/admin/ChangeLog.1
@@ -2592,4 +2592,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/admin/nt/README-UNDUMP.W32 b/admin/nt/README-UNDUMP.W32
index aa91633..b6ed8ee 100644
--- a/admin/nt/README-UNDUMP.W32
+++ b/admin/nt/README-UNDUMP.W32
@@ -55,4 +55,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/admin/nt/README-ftp-server b/admin/nt/README-ftp-server
index 5fd363c..4f156b9 100644
--- a/admin/nt/README-ftp-server
+++ b/admin/nt/README-ftp-server
@@ -227,7 +227,7 @@ See the end of the file for license conditions.
   The Emacs on MS Windows FAQ is distributed with Emacs (info
   manual "efaq-w32"), and at
 
-       http://www.gnu.org/software/emacs/manual/efaq-w32.html
+       https://www.gnu.org/software/emacs/manual/efaq-w32.html
 
   In addition to the FAQ, there is a mailing list for discussing issues
   related to the Windows port of Emacs.  For information about the
@@ -274,4 +274,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
+along with GNU Emacs.  If not, see https://www.gnu.org/licenses/.
diff --git a/build-aux/install-sh b/build-aux/install-sh
index 0360b79..ac159ce 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=2016-01-11.22; # UTC
+scriptversion=2017-09-23.17; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,15 +271,18 @@ do
     fi
     dst=$dst_arg
 
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
+    # If destination is a directory, append the input filename.
     if test -d "$dst"; then
       if test "$is_target_a_directory" = never; then
         echo "$0: $dst_arg: Is a directory" >&2
         exit 1
       fi
       dstdir=$dst
-      dst=$dstdir/`basename "$src"`
+      dstbase=`basename "$src"`
+      case $dst in
+       */) dst=$dst$dstbase;;
+       *)  dst=$dst/$dstbase;;
+      esac
       dstdir_status=0
     else
       dstdir=`dirname "$dst"`
@@ -288,6 +291,11 @@ do
     fi
   fi
 
+  case $dstdir in
+    */) dstdirslash=$dstdir;;
+    *)  dstdirslash=$dstdir/;;
+  esac
+
   obsolete_mkdir_used=false
 
   if test $dstdir_status != 0; then
@@ -427,8 +435,8 @@ do
   else
 
     # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
+    dsttmp=${dstdirslash}_inst.$$_
+    rmtmp=${dstdirslash}_rm.$$_
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
diff --git a/config.bat b/config.bat
index d1f2702..d0251df 100644
--- a/config.bat
+++ b/config.bat
@@ -16,7 +16,7 @@ rem   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See the
 rem   GNU General Public License for more details.
 
 rem   You should have received a copy of the GNU General Public License
-rem   along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
+rem   along with GNU Emacs.  If not, see https://www.gnu.org/licenses/.
 
 rem   ----------------------------------------------------------------------
 rem   YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
diff --git a/doc/emacs/ChangeLog.1 b/doc/emacs/ChangeLog.1
index 3c7aeb0..169a4b4 100644
--- a/doc/emacs/ChangeLog.1
+++ b/doc/emacs/ChangeLog.1
@@ -1121,7 +1121,7 @@
        Convert some TeX accents (e.g., '@l{}') to UTF-8 (e.g., 'ł').
        Apparently the TeX accents cause problems when generating gnu.org
        web pages, e.g., @l{} is rendered as '/l' on
-       <http://www.gnu.org/software/emacs/manual/html_node/
+       <https://www.gnu.org/software/emacs/manual/html_node/
        emacs/Acknowledgments.html>.
 
 2013-03-16  Glenn Morris  <address@hidden>
@@ -10934,4 +10934,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/doc/lispintro/ChangeLog.1 b/doc/lispintro/ChangeLog.1
index 7e5b629..de24c8e 100644
--- a/doc/lispintro/ChangeLog.1
+++ b/doc/lispintro/ChangeLog.1
@@ -797,4 +797,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/doc/lispref/ChangeLog.1 b/doc/lispref/ChangeLog.1
index 1044ad7..490f216 100644
--- a/doc/lispref/ChangeLog.1
+++ b/doc/lispref/ChangeLog.1
@@ -14004,4 +14004,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/doc/man/ChangeLog.1 b/doc/man/ChangeLog.1
index aa863ff..68498c6 100644
--- a/doc/man/ChangeLog.1
+++ b/doc/man/ChangeLog.1
@@ -191,4 +191,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/doc/misc/ChangeLog.1 b/doc/misc/ChangeLog.1
index 2b1571c..bc2c184 100644
--- a/doc/misc/ChangeLog.1
+++ b/doc/misc/ChangeLog.1
@@ -12131,4 +12131,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index a8ece77..7809cfe 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -3501,7 +3501,7 @@ The most up-to-date official GNU software is normally 
kept at
 
 A list of sites mirroring @samp{ftp.gnu.org} can be found at
 
address@hidden://www.gnu.org/prep/ftp}
address@hidden://www.gnu.org/prep/ftp}
 
 @node Difference between Emacs and XEmacs
 @section What is the difference between Emacs and XEmacs (formerly Lucid 
Emacs)?
diff --git a/etc/ChangeLog.1 b/etc/ChangeLog.1
index e502c65..9514ea2 100644
--- a/etc/ChangeLog.1
+++ b/etc/ChangeLog.1
@@ -6906,4 +6906,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/etc/NEWS b/etc/NEWS
index 922dfbd..ab9a2a5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -600,6 +600,11 @@ The two new variables, 'bidi-paragraph-start-re' and
 'bidi-paragraph-separate-re', allow customization of what exactly are
 paragraphs, for the purposes of bidirectional display.
 
+---
+** New variable 'x-wait-for-event-timeout'.
+This controls how long Emacs will wait for updates to the graphical
+state to take effect (making a frame visible, for example).
+
 
 * Changes in Specialized Modes and Packages in Emacs 26.1
 
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index d1e4762..b50ac7f 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -50,8 +50,8 @@ You can now find them here :
 - https://github.com/org-mime/org-mime
 
 *** Change ~org-texinfo-classes~ value
-The value cannot support functions to create sectionning commands
-anymore.  Also, the sectionning commands should include commands for
+The value cannot support functions to create sectioning commands
+anymore.  Also, the sectioning commands should include commands for
 appendices.  See the docstring for more information.
 *** Removal of ~:sitemap-sans-extension~
 
@@ -159,7 +159,7 @@ developers to prepend code to the scheme block being 
processed.
 Multiple ~:prologue~ headers can be added each of them using a string
 with the content to be added.
 
-The scheme blocks are prepared by surronding the code in the block
+The scheme blocks are prepared by surrounding the code in the block
 with a let form. The content of the ~:prologue~ headers are prepended
 before this let form.
 
@@ -280,7 +280,7 @@ argument for the scope of the clock table.
 Global table of contents are generated using vanilla Markdown syntax
 instead of HTML.  Also #+TOC keyword, including local table of
 contents, are now supported.
-**** Add Slovanian translations
+**** Add Slovenian translations
 **** Implement ~org-export-insert-image-links~
 This new function is meant to be used in back-ends supporting images
 as descriptions of links, a.k.a. image links.  See its docstring for
@@ -467,7 +467,7 @@ far away in the future.
 *** Save point before opening a file with an unknown search option
 
 When following a file link with a search option (e.g., =::#custom-id=)
-that doesn't exist in the target file, save positon before raising an
+that doesn't exist in the target file, save position before raising an
 error.  As a consequence, it is possible to jump back to the original
 document with ~org-mark-ring-goto~ (default binding =C-c &=).
 
@@ -479,7 +479,7 @@ See docstring for details.
 
 This variable is a ~defcustom~ and replaces the variable
 ~org-babel-capitalize-example-region-markers~, which is a ~defvar~ and
-is now obselete.
+is now obsolete.
 *** =INCLUDE= keywords in commented trees are now ignored.
 *** Default value for ~org-texinfo-text-markup-alist~ changed.
 
diff --git a/leim/ChangeLog.1 b/leim/ChangeLog.1
index e7f8a46..db91ac2 100644
--- a/leim/ChangeLog.1
+++ b/leim/ChangeLog.1
@@ -2593,4 +2593,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lib-src/ChangeLog.1 b/lib-src/ChangeLog.1
index a9783e9..417e57f 100644
--- a/lib-src/ChangeLog.1
+++ b/lib-src/ChangeLog.1
@@ -8624,4 +8624,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index 9908f0f..3754f91 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -18,7 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <windows.h>
 #include <stdlib.h>
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h
index b69a40b..f7ee305 100644
--- a/lib-src/ntlib.h
+++ b/lib-src/ntlib.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <pwd.h>
 #include <malloc.h>
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index d8afec4..0f795b3 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -2504,20 +2504,20 @@ string.h: string.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
              -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
              -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-             -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
              -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
              -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-             -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+             -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
              -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
              -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-             -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-             -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-             -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
              -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
              -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
              -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-             -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+             -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+             -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
              -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+             -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+             -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+             -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
              -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
diff --git a/lisp/ChangeLog.1 b/lisp/ChangeLog.1
index 65997e1..b44f640 100644
--- a/lisp/ChangeLog.1
+++ b/lisp/ChangeLog.1
@@ -3259,4 +3259,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10
index 918825e..d654291 100644
--- a/lisp/ChangeLog.10
+++ b/lisp/ChangeLog.10
@@ -23556,4 +23556,4 @@ See ChangeLog.9 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11
index f3d9840..eda7603 100644
--- a/lisp/ChangeLog.11
+++ b/lisp/ChangeLog.11
@@ -14336,4 +14336,4 @@ See ChangeLog.10 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12
index 04c5d81..0d3bd88 100644
--- a/lisp/ChangeLog.12
+++ b/lisp/ChangeLog.12
@@ -33349,4 +33349,4 @@ See ChangeLog.11 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13
index f86590b..9c451a3 100644
--- a/lisp/ChangeLog.13
+++ b/lisp/ChangeLog.13
@@ -16712,4 +16712,4 @@ See ChangeLog.12 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14
index a3397b1..48f5c07 100644
--- a/lisp/ChangeLog.14
+++ b/lisp/ChangeLog.14
@@ -20562,4 +20562,4 @@ See ChangeLog.13 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index 2512d35..7bd4405 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -22817,4 +22817,4 @@ See ChangeLog.14 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16
index fb5aee1..03e6115 100644
--- a/lisp/ChangeLog.16
+++ b/lisp/ChangeLog.16
@@ -25238,4 +25238,4 @@ See ChangeLog.15 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17
index 5c415de..7894523 100644
--- a/lisp/ChangeLog.17
+++ b/lisp/ChangeLog.17
@@ -26309,4 +26309,4 @@ See ChangeLog.16 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.2 b/lisp/ChangeLog.2
index 7a48453..5087b94 100644
--- a/lisp/ChangeLog.2
+++ b/lisp/ChangeLog.2
@@ -4007,4 +4007,4 @@ See ChangeLog.1 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.3 b/lisp/ChangeLog.3
index 3bac72a..1ba33b1 100644
--- a/lisp/ChangeLog.3
+++ b/lisp/ChangeLog.3
@@ -12448,4 +12448,4 @@ See ChangeLog.2 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.4 b/lisp/ChangeLog.4
index 00ce74e..00798e5 100644
--- a/lisp/ChangeLog.4
+++ b/lisp/ChangeLog.4
@@ -8949,4 +8949,4 @@ See ChangeLog.3 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.5 b/lisp/ChangeLog.5
index 800277b..64abfe9 100644
--- a/lisp/ChangeLog.5
+++ b/lisp/ChangeLog.5
@@ -9283,4 +9283,4 @@ See ChangeLog.4 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6
index 8482637..8c985fb 100644
--- a/lisp/ChangeLog.6
+++ b/lisp/ChangeLog.6
@@ -8036,4 +8036,4 @@ See ChangeLog.5 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7
index 52a0180..62ee295 100644
--- a/lisp/ChangeLog.7
+++ b/lisp/ChangeLog.7
@@ -23126,4 +23126,4 @@ See ChangeLog.6 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.8 b/lisp/ChangeLog.8
index 7e4522f..57b5584 100644
--- a/lisp/ChangeLog.8
+++ b/lisp/ChangeLog.8
@@ -10007,4 +10007,4 @@ See ChangeLog.7 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9
index e51c0c5..376589f 100644
--- a/lisp/ChangeLog.9
+++ b/lisp/ChangeLog.9
@@ -20700,4 +20700,4 @@ See ChangeLog.8 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/cedet/ChangeLog.1 b/lisp/cedet/ChangeLog.1
index c0223cb..a17e53a 100644
--- a/lisp/cedet/ChangeLog.1
+++ b/lisp/cedet/ChangeLog.1
@@ -3475,4 +3475,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index 1d48371..f69335d 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -20,7 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/dos-vars.el b/lisp/dos-vars.el
index d552d51..90052ce 100644
--- a/lisp/dos-vars.el
+++ b/lisp/dos-vars.el
@@ -19,7 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index ff5310e..affadee 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -19,7 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/erc/ChangeLog.1 b/lisp/erc/ChangeLog.1
index 2d5403f..eefbbe9 100644
--- a/lisp/erc/ChangeLog.1
+++ b/lisp/erc/ChangeLog.1
@@ -11717,7 +11717,7 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/lisp/erc/ChangeLog.2 b/lisp/erc/ChangeLog.2
index 6d789e4..36b01e2 100644
--- a/lisp/erc/ChangeLog.2
+++ b/lisp/erc/ChangeLog.2
@@ -772,7 +772,7 @@ See ChangeLog.1 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/lisp/gnus/ChangeLog.1 b/lisp/gnus/ChangeLog.1
index 4cf5129..c21d59b 100644
--- a/lisp/gnus/ChangeLog.1
+++ b/lisp/gnus/ChangeLog.1
@@ -3717,7 +3717,7 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2
index d7ff3b6..f163338 100644
--- a/lisp/gnus/ChangeLog.2
+++ b/lisp/gnus/ChangeLog.2
@@ -18553,7 +18553,7 @@ See ChangeLog.1 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3
index a799f73..0fcb4a0 100644
--- a/lisp/gnus/ChangeLog.3
+++ b/lisp/gnus/ChangeLog.3
@@ -26340,7 +26340,7 @@ See ChangeLog.2 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1
index 31a9ea7..9bf28b0 100644
--- a/lisp/mh-e/ChangeLog.1
+++ b/lisp/mh-e/ChangeLog.1
@@ -11434,7 +11434,7 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/lisp/mh-e/ChangeLog.2 b/lisp/mh-e/ChangeLog.2
index 4871986..c3f28ae 100644
--- a/lisp/mh-e/ChangeLog.2
+++ b/lisp/mh-e/ChangeLog.2
@@ -3688,7 +3688,7 @@ See ChangeLog.1 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 127290e..5c785da 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -20,7 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <httpss://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1
index ee50f6f..7e27fb6 100644
--- a/lisp/org/ChangeLog.1
+++ b/lisp/org/ChangeLog.1
@@ -32848,4 +32848,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el
index 9250825..1b1d2dc 100644
--- a/lisp/org/ob-sql.el
+++ b/lisp/org/ob-sql.el
@@ -127,7 +127,7 @@ SQL Server on Windows and Linux platform."
             " "))
 
 (defun org-babel-sql-dbstring-sqsh (host user password database)
-  "Make sqsh commmand line args for database connection.
+  "Make sqsh command line args for database connection.
 \"sqsh\" is one method to access Sybase or MS SQL via Linux platform"
   (mapconcat #'identity
              (delq nil
diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el
index 308f42f..6d1926b 100644
--- a/lisp/org/org-datetree.el
+++ b/lisp/org/org-datetree.el
@@ -54,7 +54,7 @@ Added time stamp is active unless value is `inactive'."
   "Find or create an entry for date D.
 If KEEP-RESTRICTION is non-nil, do not widen the buffer.
 When it is nil, the buffer will be widened to make sure an existing date
-tree can be found.  If it is the sympol `subtree-at-point', then the tree
+tree can be found.  If it is the symbol `subtree-at-point', then the tree
 will be built under the headline at point."
   (setq-local org-datetree-base-level 1)
   (save-restriction
@@ -94,7 +94,7 @@ will be built under the headline at point."
 Compared to `org-datetree-find-date-create' this function creates
 entries ordered by week instead of months.
 When it is nil, the buffer will be widened to make sure an existing date
-tree can be found.  If it is the sympol `subtree-at-point', then the tree
+tree can be found.  If it is the symbol `subtree-at-point', then the tree
 will be built under the headline at point."
   (setq-local org-datetree-base-level 1)
   (save-restriction
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index ae43790..66907e2 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -5131,7 +5131,7 @@ information."
             (column
              ;; Call costly `org-export-table-cell-address' only if
              ;; absolutely necessary, i.e., if one
-             ;; of :fmt :efmt :hmft has a "plist type" value.
+             ;; of :fmt :efmt :hfmt has a "plist type" value.
              ,(and (cl-some (lambda (v) (integerp (car-safe v)))
                             (list efmt hfmt fmt))
                    '(1+ (cdr (org-export-table-cell-address cell info))))))
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 14598bc..2a867bb 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -3592,7 +3592,7 @@ so that `occur-next' and `occur-prev' will work."
 
 If `sh-use-smie' is non-nil, call `smie-config-guess'.
 Otherwise, run the sh-script specific indent learning command, as
-decribed below.
+described below.
 
 Output in buffer \"*indent*\" shows any lines which have conflicting
 values of a variable, and the final value of all variables learned.
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 13f761e..485cc97 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -388,7 +388,7 @@ the bounds of a possible ill-formed URI (one lacking a 
scheme)."
        ;; Ensure PT is actually within BOUNDARY. Check the following
        ;; example with point on the beginning of the line:
        ;;
-       ;; 3,1406710489,http://gnu.org,0,"0";
+       ;; 3,1406710489,https://gnu.org,0,"0";
        (and (<= url-beg pt end) (cons url-beg end))))))
 
 (put 'url 'thing-at-point 'thing-at-point-url-at-point)
diff --git a/lisp/url/ChangeLog.1 b/lisp/url/ChangeLog.1
index 75be6af..eb79829 100644
--- a/lisp/url/ChangeLog.1
+++ b/lisp/url/ChangeLog.1
@@ -3084,4 +3084,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/lwlib/ChangeLog.1 b/lwlib/ChangeLog.1
index 5625949..623b798 100644
--- a/lwlib/ChangeLog.1
+++ b/lwlib/ChangeLog.1
@@ -1979,4 +1979,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 8566684..1461905 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
-# serial 29
+# serial 30
 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -55,6 +55,10 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS],
 # include <signal.h>
 #endif
 
+#ifndef TIME_T_IS_SIGNED
+# define TIME_T_IS_SIGNED 0
+#endif
+
 /* Work around redefinition to rpl_putenv by other config tests.  */
 #undef putenv
 
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index ac6311f..8c42cf1 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 21
+# serial 22
 
 # Written by Paul Eggert.
 
@@ -107,16 +107,16 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
   REPLACE_MEMMEM=0;             AC_SUBST([REPLACE_MEMMEM])
   REPLACE_STPNCPY=0;            AC_SUBST([REPLACE_STPNCPY])
+  REPLACE_STRCHRNUL=0;          AC_SUBST([REPLACE_STRCHRNUL])
   REPLACE_STRDUP=0;             AC_SUBST([REPLACE_STRDUP])
+  REPLACE_STRNCAT=0;            AC_SUBST([REPLACE_STRNCAT])
+  REPLACE_STRNDUP=0;            AC_SUBST([REPLACE_STRNDUP])
+  REPLACE_STRNLEN=0;            AC_SUBST([REPLACE_STRNLEN])
   REPLACE_STRSTR=0;             AC_SUBST([REPLACE_STRSTR])
   REPLACE_STRCASESTR=0;         AC_SUBST([REPLACE_STRCASESTR])
-  REPLACE_STRCHRNUL=0;          AC_SUBST([REPLACE_STRCHRNUL])
+  REPLACE_STRTOK_R=0;           AC_SUBST([REPLACE_STRTOK_R])
   REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
   REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
-  REPLACE_STRNCAT=0;            AC_SUBST([REPLACE_STRNCAT])
-  REPLACE_STRNDUP=0;            AC_SUBST([REPLACE_STRNDUP])
-  REPLACE_STRNLEN=0;            AC_SUBST([REPLACE_STRNLEN])
   REPLACE_STRSIGNAL=0;          AC_SUBST([REPLACE_STRSIGNAL])
-  REPLACE_STRTOK_R=0;           AC_SUBST([REPLACE_STRTOK_R])
   UNDEFINE_STRTOK_R=0;          AC_SUBST([UNDEFINE_STRTOK_R])
 ])
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4
index 06268cf..de56d04 100644
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -1,4 +1,4 @@
-# sys_types_h.m4 serial 8
+# sys_types_h.m4 serial 9
 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,7 +40,7 @@ AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
 m4_version_prereq([2.70], [], [
 
 # This is taken from the following Autoconf patch:
-# 
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=e17a30e987d7ee695fb4294a82d987ec3dc9b974
+# 
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974
 
 m4_undefine([AC_HEADER_MAJOR])
 AC_DEFUN([AC_HEADER_MAJOR],
diff --git a/msdos/ChangeLog.1 b/msdos/ChangeLog.1
index e8e6ec3..6fe88d1 100644
--- a/msdos/ChangeLog.1
+++ b/msdos/ChangeLog.1
@@ -1565,4 +1565,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/msdos/INSTALL b/msdos/INSTALL
index ca4ab85..41e3654 100644
--- a/msdos/INSTALL
+++ b/msdos/INSTALL
@@ -151,4 +151,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/msdos/README b/msdos/README
index 122e815..1add1c4 100644
--- a/msdos/README
+++ b/msdos/README
@@ -38,4 +38,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/msdos/depfiles.bat b/msdos/depfiles.bat
index b2c7bc8..31c8622 100644
--- a/msdos/depfiles.bat
+++ b/msdos/depfiles.bat
@@ -16,7 +16,7 @@ rem   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See the
 rem   GNU General Public License for more details.
 
 rem   You should have received a copy of the GNU General Public License
-rem   along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
+rem   along with GNU Emacs.  If not, see https://www.gnu.org/licenses/.
 
 rem   ----------------------------------------------------------------------
 
diff --git a/msdos/inttypes.h b/msdos/inttypes.h
index 7996d05..ce7797a 100644
--- a/msdos/inttypes.h
+++ b/msdos/inttypes.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _REPL_INTTYPES_H
 #define _REPL_INTTYPES_H
diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2
index dc2b0b6..e8391bc 100644
--- a/msdos/mainmake.v2
+++ b/msdos/mainmake.v2
@@ -15,7 +15,7 @@
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 # make all     to compile and build Emacs.
 # make install to install it (installs in-place, in `bin' subdir of top dir).
diff --git a/nextstep/ChangeLog.1 b/nextstep/ChangeLog.1
index f84779d..0eb4a14 100644
--- a/nextstep/ChangeLog.1
+++ b/nextstep/ChangeLog.1
@@ -327,4 +327,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/nt/ChangeLog.1 b/nt/ChangeLog.1
index 0117639..adfdea2 100644
--- a/nt/ChangeLog.1
+++ b/nt/ChangeLog.1
@@ -3563,4 +3563,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/nt/INSTALL b/nt/INSTALL
index c6182c2..662a304 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -820,4 +820,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
index cb13473..6ebc164 100644
--- a/nt/INSTALL.W64
+++ b/nt/INSTALL.W64
@@ -224,4 +224,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
diff --git a/nt/Makefile.in b/nt/Makefile.in
index 7e911db..8215823 100644
--- a/nt/Makefile.in
+++ b/nt/Makefile.in
@@ -15,7 +15,7 @@
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 # Avoid trouble on systems where the `SHELL' variable might be
 # inherited from the environment.
diff --git a/nt/README b/nt/README
index 19ffd50..f4cca8e 100644
--- a/nt/README
+++ b/nt/README
@@ -86,7 +86,7 @@
 
   This appendix is also available (as part of the entire manual) at
 
-        
http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows
+        
https://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows
 
   In addition to the manual, there is a mailing list for discussing
   issues related to the Windows port of Emacs.  For information about
@@ -140,4 +140,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/nt/README.W32 b/nt/README.W32
index bec0b66..8964758 100644
--- a/nt/README.W32
+++ b/nt/README.W32
@@ -275,7 +275,7 @@ See the end of the file for license conditions.
 
   This appendix is also available (as part of the entire manual) at
 
-        
http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows
+        
https://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows
 
   In addition to the manual, there is a mailing list for help with
   Emacs here:
@@ -325,4 +325,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/nt/addpm.c b/nt/addpm.c
index b034fff..51f2510 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /****************************************************************************
  *
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index 93e0097..0b4d437 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -25,7 +25,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <windows.h>
 
diff --git a/nt/configure.bat b/nt/configure.bat
index cd2a8f4..9705c66 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -16,7 +16,7 @@ rem   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See the
 rem   GNU General Public License for more details.
 
 rem   You should have received a copy of the GNU General Public License
-rem   along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
+rem   along with GNU Emacs.  If not, see https://www.gnu.org/licenses/.
 
 rem   ----------------------------------------------------------------------
 echo ****************************************************************
diff --git a/nt/ddeclient.c b/nt/ddeclient.c
index 15aeb84..c370ef8 100644
--- a/nt/ddeclient.c
+++ b/nt/ddeclient.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <windows.h>
 #include <ddeml.h>
diff --git a/nt/epaths.nt b/nt/epaths.nt
index ebb4ccf..4f4f86a 100644
--- a/nt/epaths.nt
+++ b/nt/epaths.nt
@@ -28,7 +28,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
 /* Together with PATH_SITELOADSEARCH, this gives the default value of
@@ -85,4 +85,3 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 
 /* Where Emacs should look for the application default file. */
 #define PATH_X_DEFAULTS ""
-
diff --git a/nt/gnulib-cfg.mk b/nt/gnulib-cfg.mk
index b75e36f..419099e 100644
--- a/nt/gnulib-cfg.mk
+++ b/nt/gnulib-cfg.mk
@@ -13,7 +13,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+# along with this file.  If not, see <https://www.gnu.org/licenses/>.
 
 
 # Gnulib modules to be omitted from Emacs.
diff --git a/nt/inc/grp.h b/nt/inc/grp.h
index 82a8bab..0c3a8ec 100644
--- a/nt/inc/grp.h
+++ b/nt/inc/grp.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GRP_H
 #define _GRP_H
diff --git a/nt/inc/inttypes.h b/nt/inc/inttypes.h
index e5037b1..e0905b7 100644
--- a/nt/inc/inttypes.h
+++ b/nt/inc/inttypes.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _REPL_INTTYPES_H
 #define _REPL_INTTYPES_H
diff --git a/nt/inc/langinfo.h b/nt/inc/langinfo.h
index a20e59b..88e12b5 100644
--- a/nt/inc/langinfo.h
+++ b/nt/inc/langinfo.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LANGINFO_H
 #define _LANGINFO_H
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index e1dbe29..89aa943 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Define symbols to identify the version of Unix this is.
    Define all the symbols that apply correctly.  */
diff --git a/nt/inc/nl_types.h b/nt/inc/nl_types.h
index 8236a6d..6ed0994 100644
--- a/nt/inc/nl_types.h
+++ b/nt/inc/nl_types.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _NL_TYPES_H
 #define _NL_TYPES_H
diff --git a/nt/inc/stdint.h b/nt/inc/stdint.h
index 1e41ddb..c4fb98d 100644
--- a/nt/inc/stdint.h
+++ b/nt/inc/stdint.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _NT_STDINT_H_
 #define _NT_STDINT_H_
diff --git a/nt/inc/sys/resource.h b/nt/inc/sys/resource.h
index 2964a64..de10aae 100644
--- a/nt/inc/sys/resource.h
+++ b/nt/inc/sys/resource.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef INC_SYS_RESOURCE_H_
 #define INC_SYS_RESOURCE_H_
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 32f6a1d..b7c1103 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
 /* Workable version of <sys/socket.h> based on winsock.h */
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index d686af1..2f1cf46 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -16,7 +16,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef INC_SYS_STAT_H_
 #define INC_SYS_STAT_H_
diff --git a/nt/inc/sys/wait.h b/nt/inc/sys/wait.h
index 6be7fd3..51eae82 100644
--- a/nt/inc/sys/wait.h
+++ b/nt/inc/sys/wait.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef INC_SYS_WAIT_H_
 #define INC_SYS_WAIT_H_
diff --git a/nt/preprep.c b/nt/preprep.c
index 7366035..fc91628 100644
--- a/nt/preprep.c
+++ b/nt/preprep.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 
    Andrew Innes <address@hidden>       16-Jan-1999
diff --git a/nt/runemacs.c b/nt/runemacs.c
index a98ff4b..d6e02b2 100644
--- a/nt/runemacs.c
+++ b/nt/runemacs.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
 /*
diff --git a/oldXMenu/ChangeLog.1 b/oldXMenu/ChangeLog.1
index 8fa3794..8ac7e18 100644
--- a/oldXMenu/ChangeLog.1
+++ b/oldXMenu/ChangeLog.1
@@ -727,4 +727,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.1 b/src/ChangeLog.1
index e51b4ad..74a5012 100644
--- a/src/ChangeLog.1
+++ b/src/ChangeLog.1
@@ -3536,4 +3536,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 65a8587..1bd822d 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -27927,4 +27927,4 @@ See ChangeLog.9 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index 365fc27..eb1aeb1 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -31400,4 +31400,4 @@ See ChangeLog.10 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12
index 367e0d6..35993ad 100644
--- a/src/ChangeLog.12
+++ b/src/ChangeLog.12
@@ -22951,4 +22951,4 @@ See ChangeLog.11 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.13 b/src/ChangeLog.13
index 66f062d..6f5ea03 100644
--- a/src/ChangeLog.13
+++ b/src/ChangeLog.13
@@ -17920,4 +17920,4 @@ See ChangeLog.12 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2
index 56015d5..42e1e83 100644
--- a/src/ChangeLog.2
+++ b/src/ChangeLog.2
@@ -4786,4 +4786,4 @@ See ChangeLog.1 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index 8f9b38e..17fd69c 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -16518,4 +16518,4 @@ See ChangeLog.2 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4
index bb13c9a..2935ee5 100644
--- a/src/ChangeLog.4
+++ b/src/ChangeLog.4
@@ -6921,4 +6921,4 @@ See ChangeLog.3 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5
index f0fde02..489ccfa 100644
--- a/src/ChangeLog.5
+++ b/src/ChangeLog.5
@@ -7163,4 +7163,4 @@ See ChangeLog.4 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index 2282916..f2b9e60 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -5373,4 +5373,4 @@ See ChangeLog.5 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7
index eb4833c..32472ac 100644
--- a/src/ChangeLog.7
+++ b/src/ChangeLog.7
@@ -11106,4 +11106,4 @@ See ChangeLog.6 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8
index ae971b5..cf7c926 100644
--- a/src/ChangeLog.8
+++ b/src/ChangeLog.8
@@ -13994,4 +13994,4 @@ See ChangeLog.7 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9
index 7b8f500..6de10c4 100644
--- a/src/ChangeLog.9
+++ b/src/ChangeLog.9
@@ -13309,4 +13309,4 @@ See ChangeLog.8 for earlier changes.
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/cygw32.c b/src/cygw32.c
index 962b6a2..724363d 100644
--- a/src/cygw32.c
+++ b/src/cygw32.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
 #include "cygw32.h"
diff --git a/src/cygw32.h b/src/cygw32.h
index a10b830..f006c11 100644
--- a/src/cygw32.h
+++ b/src/cygw32.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef CYGW32_H
 #define CYGW32_H
diff --git a/src/dosfns.c b/src/dosfns.c
index 7bf1dee..8687049 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -16,7 +16,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
diff --git a/src/dosfns.h b/src/dosfns.h
index 266430d..2846010 100644
--- a/src/dosfns.h
+++ b/src/dosfns.h
@@ -18,7 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #define DOS_COUNTRY_INFO 34    /* no of bytes returned by dos int 38h */
 extern unsigned char dos_country_info[DOS_COUNTRY_INFO];
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 0da7039..9f05524 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -577,6 +577,10 @@ xg_check_special_colors (struct frame *f,
     if (get_fg)
       gtk_style_context_get_color (gsty, state, &col);
     else
+      /* FIXME: gtk_style_context_get_background_color is deprecated
+         in GTK+ 3.16.  New versions of GTK+ don’t use the concept of
+         a single background color any more, so we shouldn’t query for
+         it.  */
       gtk_style_context_get_background_color (gsty, state, &col);
 
     unsigned short
diff --git a/src/msdos.c b/src/msdos.c
index 5b02575..68daa10 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Contributed by Morten Welinder */
 /* New display, keyboard, and mouse control by Kim F. Storm */
diff --git a/src/msdos.h b/src/msdos.h
index f4312c5..16292c5 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef EMACS_MSDOS_H
 #define EMACS_MSDOS_H
diff --git a/src/w16select.c b/src/w16select.c
index 70037f3..0ecd39b 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* These functions work by using WinOldAp interface.  WinOldAp
    (WINOLDAP.MOD) is a Microsoft Windows extension supporting
diff --git a/src/w32.c b/src/w32.c
index eb531aa..fb13bd7 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
    Geoff Voelker (address@hidden)                         7-29-94
diff --git a/src/w32.h b/src/w32.h
index 1727f8b..cd78288 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -17,7 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifdef CYGWIN
 #error "w32.h is not compatible with Cygwin"
diff --git a/src/w32common.h b/src/w32common.h
index 30718e0..6de4ab4 100644
--- a/src/w32common.h
+++ b/src/w32common.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 */
 
diff --git a/src/w32console.c b/src/w32console.c
index a4c089f..15d11d5 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
    Tim Fleehart (address@hidden)               1-17-92
diff --git a/src/w32fns.c b/src/w32fns.c
index a774644..efbd81b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Added by Kevin Gallo */
 
diff --git a/src/w32font.c b/src/w32font.c
index 9881119..d6bd7d6 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <windows.h>
diff --git a/src/w32font.h b/src/w32font.h
index 42b425f..2d84950 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef EMACS_W32FONT_H
 #define EMACS_W32FONT_H
diff --git a/src/w32gui.h b/src/w32gui.h
index 4f142b0..00d5d1f 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef EMACS_W32GUI_H
 #define EMACS_W32GUI_H
diff --git a/src/w32heap.c b/src/w32heap.c
index 510f676..85ed050 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -14,7 +14,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>. */
+   along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>. */
 
 /*
   Geoff Voelker (address@hidden)                          7-29-94
diff --git a/src/w32heap.h b/src/w32heap.h
index 0b3e9dd..1cabbd8 100644
--- a/src/w32heap.h
+++ b/src/w32heap.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
    Geoff Voelker (address@hidden)                           7-29-94
 */
diff --git a/src/w32inevt.c b/src/w32inevt.c
index ed1f1d2..0b0f3f9 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
    Drew Bliss                   01-Oct-93
diff --git a/src/w32inevt.h b/src/w32inevt.h
index 87442cd..b761d95 100644
--- a/src/w32inevt.h
+++ b/src/w32inevt.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef EMACS_W32INEVT_H
 #define EMACS_W32INEVT_H
diff --git a/src/w32menu.c b/src/w32menu.c
index de5c4b4..d394628 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
diff --git a/src/w32notify.c b/src/w32notify.c
index 7987d9f..4e0e580 100644
--- a/src/w32notify.c
+++ b/src/w32notify.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Eli Zaretskii <address@hidden>.
 
diff --git a/src/w32proc.c b/src/w32proc.c
index 4459ebe..ca59f99 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
    Drew Bliss                   Oct 14, 1993
diff --git a/src/w32reg.c b/src/w32reg.c
index de19ae1..040857e 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Kevin Gallo */
 
diff --git a/src/w32select.c b/src/w32select.c
index 03bcc1c..003bef2 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Kevin Gallo, Benjamin Riefenstahl */
 
diff --git a/src/w32select.h b/src/w32select.h
index 5cf2d6f..da2057a 100644
--- a/src/w32select.h
+++ b/src/w32select.h
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef W32SELECT_H
 #define W32SELECT_H
diff --git a/src/w32term.c b/src/w32term.c
index d7ec401..c15cbbf 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <signal.h>
@@ -163,10 +163,6 @@ int last_scroll_bar_drag_pos;
 /* Keyboard code page - may be changed by language-change events.  */
 int w32_keyboard_codepage;
 
-/* Incremented by w32_read_socket whenever it really tries to read
-   events.  */
-static int volatile input_signal_count;
-
 #ifdef CYGWIN
 int w32_message_fd = -1;
 #endif /* CYGWIN */
@@ -4658,9 +4654,6 @@ w32_read_socket (struct terminal *terminal,
 
   block_input ();
 
-  /* So people can tell when we have read the available input.  */
-  input_signal_count++;
-
   /* Process any incoming thread messages.  */
   drain_message_queue ();
 
@@ -6614,7 +6607,8 @@ w32_frame_raise_lower (struct frame *f, bool raise_flag)
 
 /* Change of visibility.  */
 
-/* This tries to wait until the frame is really visible.
+/* This tries to wait until the frame is really visible, depending on
+   the value of Vx_visible_frame_timeout.
    However, if the window manager asks the user where to position
    the frame, this will return before the user finishes doing that.
    The frame will not actually be visible at that time,
@@ -6673,12 +6667,16 @@ x_make_frame_visible (struct frame *f)
                      : SW_SHOWNORMAL);
     }
 
+  if (!FLOATP (Vx_wait_for_event_timeout))
+      return;
+
   /* Synchronize to ensure Emacs knows the frame is visible
      before we do anything else.  We do this loop with input not blocked
      so that incoming events are handled.  */
   {
     Lisp_Object frame;
-    int count;
+    double timeout = XFLOAT_DATA (Vx_wait_for_event_timeout);
+    double start_time = XFLOAT_DATA (Ffloat_time (Qnil));
 
     /* This must come after we set COUNT.  */
     unblock_input ();
@@ -6688,8 +6686,8 @@ x_make_frame_visible (struct frame *f)
     /* Wait until the frame is visible.  Process X events until a
        MapNotify event has been seen, or until we think we won't get a
        MapNotify at all..  */
-    for (count = input_signal_count + 10;
-        input_signal_count < count && !FRAME_VISIBLE_P (f);)
+    while (timeout > (XFLOAT_DATA (Ffloat_time (Qnil)) - start_time) &&
+           !FRAME_VISIBLE_P (f))
       {
        /* Force processing of queued events.  */
         /* TODO: x_sync equivalent?  */
@@ -7321,6 +7319,17 @@ syms_of_w32term (void)
   DEFSYM (Qrenamed_from, "renamed-from");
   DEFSYM (Qrenamed_to, "renamed-to");
 
+  DEFVAR_LISP ("x-wait-for-event-timeout", Vx_wait_for_event_timeout,
+    doc: /* How long to wait for X events.
+
+Emacs will wait up to this many seconds to receive X events after
+making changes which affect the state of the graphical interface.
+Under some window managers this can take an indefinite amount of time,
+so it is important to limit the wait.
+
+If set to a non-float value, there will be no wait at all.  */);
+  Vx_wait_for_event_timeout = make_float (0.1);
+
   DEFVAR_INT ("w32-num-mouse-buttons",
              w32_num_mouse_buttons,
              doc: /* Number of physical mouse buttons.  */);
diff --git a/src/w32term.h b/src/w32term.h
index 9956682..16b44b0 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Added by Kevin Gallo */
 
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index e405563..ca030ad 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -14,7 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 587a241..39a69d1 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <signal.h>
diff --git a/src/xterm.c b/src/xterm.c
index 0b32190..9027576 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11029,17 +11029,22 @@ x_sync_with_move (struct frame *f, int left, int top, 
bool fuzzy)
 void
 x_wait_for_event (struct frame *f, int eventtype)
 {
-  int level = interrupt_input_blocked;
+  if (!FLOATP (Vx_wait_for_event_timeout))
+    return;
 
+  int level = interrupt_input_blocked;
   fd_set fds;
   struct timespec tmo, tmo_at, time_now;
   int fd = ConnectionNumber (FRAME_X_DISPLAY (f));
 
   f->wait_event_type = eventtype;
 
-  /* Set timeout to 0.1 second.  Hopefully not noticeable.
-     Maybe it should be configurable.  */
-  tmo = make_timespec (0, 100 * 1000 * 1000);
+  /* Default timeout is 0.1 second.  Hopefully not noticeable.  */
+  double timeout = XFLOAT_DATA (Vx_wait_for_event_timeout);
+  time_t timeout_seconds = (time_t) timeout;
+  tmo = make_timespec
+    (timeout_seconds, (long int) ((timeout - timeout_seconds)
+                                  * 1000 * 1000 * 1000));
   tmo_at = timespec_add (current_timespec (), tmo);
 
   while (f->wait_event_type)
@@ -11365,8 +11370,13 @@ xembed_send_message (struct frame *f, Time t, enum 
xembed_message msg,
 
 /* Change of visibility.  */
 
-/* This function sends the request to make the frame visible, but may
-   return before it the frame's visibility is changed.  */
+/* This tries to wait until the frame is really visible, depending on
+   the value of Vx_wait_for_event_timeout.
+   However, if the window manager asks the user where to position
+   the frame, this will return before the user finishes doing that.
+   The frame will not actually be visible at that time,
+   but it will become visible later when the window manager
+   finishes with it.  */
 
 void
 x_make_frame_visible (struct frame *f)
@@ -11437,11 +11447,14 @@ x_make_frame_visible (struct frame *f)
      before we do anything else.  We do this loop with input not blocked
      so that incoming events are handled.  */
   {
+    Lisp_Object frame;
     /* This must be before UNBLOCK_INPUT
        since events that arrive in response to the actions above
        will set it when they are handled.  */
     bool previously_visible = f->output_data.x->has_been_visible;
 
+    XSETFRAME (frame, f);
+
     int original_left = f->left_pos;
     int original_top = f->top_pos;
 
@@ -11488,6 +11501,10 @@ x_make_frame_visible (struct frame *f)
 
        unblock_input ();
       }
+
+    /* Try to wait for a MapNotify event (that is what tells us when a
+       frame becomes visible).  */
+    x_wait_for_event (f, MapNotify);
   }
 }
 
@@ -13283,6 +13300,17 @@ This should be one of the symbols `ctrl', `alt', 
`hyper', `meta',
 keysyms.  The default is nil, which is the same as `super'.  */);
   Vx_super_keysym = Qnil;
 
+  DEFVAR_LISP ("x-wait-for-event-timeout", Vx_wait_for_event_timeout,
+    doc: /* How long to wait for X events.
+
+Emacs will wait up to this many seconds to receive X events after
+making changes which affect the state of the graphical interface.
+Under some window managers this can take an indefinite amount of time,
+so it is important to limit the wait.
+
+If set to a non-float value, there will be no wait at all.  */);
+  Vx_wait_for_event_timeout = make_float (0.1);
+
   DEFVAR_LISP ("x-keysym-table", Vx_keysym_table,
     doc: /* Hash table of character codes indexed by X keysym codes.  */);
   Vx_keysym_table = make_hash_table (hashtest_eql, 900,
diff --git a/test/ChangeLog.1 b/test/ChangeLog.1
index 4491eb8..d244798 100644
--- a/test/ChangeLog.1
+++ b/test/ChangeLog.1
@@ -2967,4 +2967,4 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index bfdc301..d430cae 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2720,7 +2720,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
              (file-symlink-p tmp-name5)))
            ;; `smbclient' does not show symlinks in directories, so
            ;; we cannot delete a non-empty directory.  We delete the
-           ;; file explicitely.
+           ;; file explicitly.
            (delete-file tmp-name5))
 
        ;; Cleanup.



reply via email to

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