emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] comment-cache 4143223 3/3: Merge branch 'master' into comm


From: Alan Mackenzie
Subject: [Emacs-diffs] comment-cache 4143223 3/3: Merge branch 'master' into comment-cache
Date: Fri, 11 Mar 2016 23:43:04 +0000

branch: comment-cache
commit 41432237f2f555db7bc4656394f4264179701d93
Merge: e7591bb 63efcc2
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    Merge branch 'master' into comment-cache
---
 admin/alloc-colors.c                         |    4 +-
 admin/notes/unicode                          |    7 +
 configure.ac                                 |   12 +-
 doc/emacs/search.texi                        |   21 +-
 doc/man/etags.1                              |    6 +-
 doc/misc/texinfo.tex                         |  658 +++++++++++---------------
 etc/DEBUG                                    |    2 +-
 etc/NEWS                                     |   52 ++-
 lib-src/ebrowse.c                            |    4 +-
 lib-src/emacsclient.c                        |    4 +-
 lib-src/etags.c                              |   35 +-
 lib-src/hexl.c                               |    7 +-
 lib-src/make-docfile.c                       |    4 +-
 lib-src/movemail.c                           |   49 ++-
 lib-src/ntlib.c                              |    4 +-
 lib-src/ntlib.h                              |    5 +-
 lib-src/pop.c                                |    4 +-
 lib-src/pop.h                                |    4 +-
 lib-src/profile.c                            |    4 +-
 lib-src/update-game-score.c                  |    4 +-
 lib/intprops.h                               |    8 +-
 lib/set-permissions.c                        |    1 +
 lisp/calc/calc-units.el                      |   17 +-
 lisp/cedet/semantic/symref/grep.el           |    2 +
 lisp/dabbrev.el                              |    8 +-
 lisp/emacs-lisp/lisp-mode.el                 |    8 +-
 lisp/files.el                                |    6 +-
 lisp/international/mule-cmds.el              |   12 +-
 lisp/isearch.el                              |    6 +-
 lisp/mail/rmail.el                           |    7 +-
 lisp/net/tramp-sh.el                         |   66 ++--
 lisp/progmodes/js.el                         |   11 +-
 lisp/progmodes/ruby-mode.el                  |  158 ++++---
 lisp/progmodes/xref.el                       |    1 +
 lisp/simple.el                               |    2 +
 lisp/textmodes/tex-mode.el                   |   76 ++-
 lisp/wdired.el                               |   22 +-
 lisp/window.el                               |   47 ++-
 lisp/xml.el                                  |    9 +-
 m4/extern-inline.m4                          |    1 +
 modules/mod-test/mod-test.c                  |    4 +-
 msdos/inttypes.h                             |    4 +-
 nt/addpm.c                                   |    4 +-
 nt/cmdproxy.c                                |    4 +-
 nt/ddeclient.c                               |    5 +-
 nt/inc/grp.h                                 |    5 +-
 nt/inc/inttypes.h                            |    4 +-
 nt/inc/langinfo.h                            |    5 +-
 nt/inc/ms-w32.h                              |    4 +-
 nt/inc/nl_types.h                            |    4 +-
 nt/inc/stdint.h                              |    4 +-
 nt/inc/sys/socket.h                          |    4 +-
 nt/inc/sys/stat.h                            |    4 +-
 nt/inc/sys/wait.h                            |    4 +-
 nt/preprep.c                                 |   13 +-
 nt/runemacs.c                                |    4 +-
 oldXMenu/Activate.c                          |    4 +-
 oldXMenu/Create.c                            |    4 +-
 oldXMenu/FindSel.c                           |    4 +-
 oldXMenu/Internal.c                          |    4 +-
 oldXMenu/insque.c                            |    4 +-
 src/alloc.c                                  |    4 +-
 src/atimer.c                                 |    4 +-
 src/atimer.h                                 |    4 +-
 src/bidi.c                                   |   44 ++-
 src/blockinput.h                             |    4 +-
 src/buffer.c                                 |   18 +-
 src/buffer.h                                 |   26 +-
 src/bytecode.c                               |    8 +-
 src/callint.c                                |    4 +-
 src/callproc.c                               |    8 +-
 src/casefiddle.c                             |    4 +-
 src/casetab.c                                |    4 +-
 src/category.c                               |    8 +-
 src/category.h                               |    4 +-
 src/ccl.c                                    |    4 +-
 src/ccl.h                                    |    4 +-
 src/character.c                              |    4 +-
 src/character.h                              |    4 +-
 src/charset.c                                |    4 +-
 src/charset.h                                |    4 +-
 src/chartab.c                                |    6 +-
 src/cm.c                                     |    4 +-
 src/cm.h                                     |    4 +-
 src/cmds.c                                   |    6 +-
 src/coding.c                                 |    8 +-
 src/coding.h                                 |    4 +-
 src/commands.h                               |    4 +-
 src/composite.c                              |    4 +-
 src/composite.h                              |    4 +-
 src/conf_post.h                              |    4 +-
 src/cygw32.c                                 |    4 +-
 src/cygw32.h                                 |    4 +-
 src/data.c                                   |    6 +-
 src/dbusbind.c                               |    4 +-
 src/decompress.c                             |    4 +-
 src/dired.c                                  |    4 +-
 src/dispextern.h                             |    4 +-
 src/dispnew.c                                |    6 +-
 src/disptab.h                                |    4 +-
 src/doc.c                                    |    9 +-
 src/doprnt.c                                 |    4 +-
 src/dosfns.c                                 |    4 +-
 src/dosfns.h                                 |    5 +-
 src/dynlib.c                                 |    4 +-
 src/dynlib.h                                 |    4 +-
 src/editfns.c                                |   10 +-
 src/emacs-icon.h                             |    5 +-
 src/emacs-module.c                           |    4 +-
 src/emacs-module.h                           |    4 +-
 src/emacs.c                                  |    4 +-
 src/emacsgtkfixed.c                          |    4 +-
 src/emacsgtkfixed.h                          |    4 +-
 src/eval.c                                   |    8 +-
 src/fileio.c                                 |   22 +-
 src/filelock.c                               |    4 +-
 src/firstfile.c                              |    4 +-
 src/floatfns.c                               |   14 +-
 src/fns.c                                    |   26 +-
 src/font.c                                   |    8 +-
 src/font.h                                   |    4 +-
 src/fontset.c                                |    4 +-
 src/fontset.h                                |    4 +-
 src/frame.c                                  |    6 +-
 src/frame.h                                  |    4 +-
 src/fringe.c                                 |    6 +-
 src/ftcrfont.c                               |    4 +-
 src/ftfont.c                                 |    4 +-
 src/ftfont.h                                 |    5 +-
 src/ftxfont.c                                |    4 +-
 src/getpagesize.h                            |    5 +-
 src/gfilenotify.c                            |    4 +-
 src/gnutls.c                                 |    4 +-
 src/gnutls.h                                 |    4 +-
 src/gtkutil.c                                |    4 +-
 src/gtkutil.h                                |    4 +-
 src/image.c                                  |    4 +-
 src/indent.c                                 |    4 +-
 src/indent.h                                 |    4 +-
 src/inotify.c                                |    6 +-
 src/insdel.c                                 |    4 +-
 src/intervals.c                              |    4 +-
 src/intervals.h                              |    4 +-
 src/keyboard.c                               |    8 +-
 src/keyboard.h                               |    4 +-
 src/keymap.c                                 |   10 +-
 src/keymap.h                                 |    4 +-
 src/kqueue.c                                 |   12 +-
 src/lastfile.c                               |    4 +-
 src/lisp.h                                   |    4 +-
 src/lread.c                                  |   10 +-
 src/macfont.h                                |    5 +-
 src/macfont.m                                |    4 +-
 src/macros.c                                 |    4 +-
 src/macros.h                                 |    4 +-
 src/marker.c                                 |    4 +-
 src/menu.c                                   |    8 +-
 src/menu.h                                   |    4 +-
 src/minibuf.c                                |    6 +-
 src/msdos.c                                  |    4 +-
 src/msdos.h                                  |    5 +-
 src/nsfns.m                                  |   12 +-
 src/nsfont.m                                 |    4 +-
 src/nsgui.h                                  |    4 +-
 src/nsimage.m                                |    4 +-
 src/nsmenu.m                                 |    4 +-
 src/nsselect.m                               |   10 +-
 src/nsterm.h                                 |   12 +-
 src/nsterm.m                                 |    4 +-
 src/print.c                                  |    8 +-
 src/process.c                                |   22 +-
 src/process.h                                |    4 +-
 src/profiler.c                               |    4 +-
 src/puresize.h                               |    4 +-
 src/ralloc.c                                 |    4 +-
 src/region-cache.c                           |    4 +-
 src/region-cache.h                           |    4 +-
 src/scroll.c                                 |    4 +-
 src/search.c                                 |    4 +-
 src/sheap.c                                  |    4 +-
 src/sound.c                                  |    4 +-
 src/syntax.c                                 |    4 +-
 src/syntax.h                                 |    4 +-
 src/sysdep.c                                 |    4 +-
 src/sysselect.h                              |    4 +-
 src/syssignal.h                              |    4 +-
 src/sysstdio.h                               |    4 +-
 src/systime.h                                |    4 +-
 src/systty.h                                 |    4 +-
 src/syswait.h                                |    4 +-
 src/term.c                                   |    4 +-
 src/termchar.h                               |    4 +-
 src/termhooks.h                              |    4 +-
 src/terminal.c                               |    4 +-
 src/terminfo.c                               |    4 +-
 src/termopts.h                               |    4 +-
 src/textprop.c                               |    6 +-
 src/tparam.h                                 |    4 +-
 src/undo.c                                   |    4 +-
 src/unexaix.c                                |    4 +-
 src/unexcoff.c                               |    4 +-
 src/unexcw.c                                 |    4 +-
 src/unexelf.c                                |    4 +-
 src/unexmacosx.c                             |    4 +-
 src/unexw32.c                                |   13 +-
 src/vm-limit.c                               |    4 +-
 src/w16select.c                              |    6 +-
 src/w32.c                                    |   38 ++-
 src/w32.h                                    |    4 +-
 src/w32common.h                              |    6 +-
 src/w32console.c                             |    4 +-
 src/w32fns.c                                 |   12 +-
 src/w32font.c                                |    4 +-
 src/w32font.h                                |    4 +-
 src/w32gui.h                                 |    4 +-
 src/w32heap.c                                |   11 +-
 src/w32heap.h                                |    4 +-
 src/w32inevt.c                               |    4 +-
 src/w32inevt.h                               |    4 +-
 src/w32menu.c                                |    4 +-
 src/w32notify.c                              |    4 +-
 src/w32proc.c                                |    4 +-
 src/w32reg.c                                 |    4 +-
 src/w32select.c                              |    4 +-
 src/w32select.h                              |    4 +-
 src/w32term.c                                |    4 +-
 src/w32term.h                                |    4 +-
 src/w32uniscribe.c                           |    4 +-
 src/w32xfns.c                                |    4 +-
 src/widget.c                                 |    4 +-
 src/widget.h                                 |    4 +-
 src/widgetprv.h                              |    4 +-
 src/window.c                                 |   10 +-
 src/window.h                                 |    4 +-
 src/xdisp.c                                  |   10 +-
 src/xfaces.c                                 |   10 +-
 src/xfns.c                                   |   40 +-
 src/xfont.c                                  |    4 +-
 src/xftfont.c                                |    4 +-
 src/xgselect.c                               |    4 +-
 src/xgselect.h                               |    4 +-
 src/xmenu.c                                  |    4 +-
 src/xml.c                                    |    4 +-
 src/xrdb.c                                   |    4 +-
 src/xselect.c                                |   16 +-
 src/xsettings.c                              |    4 +-
 src/xsettings.h                              |    4 +-
 src/xsmfns.c                                 |    4 +-
 src/xterm.c                                  |    4 +-
 src/xterm.h                                  |    9 +-
 src/xwidget.c                                |   33 +-
 src/xwidget.h                                |    4 +-
 test/automated/dabbrev-tests.el              |   42 ++
 test/lisp/progmodes/ruby-mode-tests.el       |   17 +
 test/lisp/xml-tests.el                       |    7 +-
 test/manual/etags/CTAGS.good                 |   42 +-
 test/manual/etags/ETAGS.good_1               |   48 +-
 test/manual/etags/ETAGS.good_2               |   48 +-
 test/manual/etags/ETAGS.good_3               |   48 +-
 test/manual/etags/ETAGS.good_4               |   48 +-
 test/manual/etags/ETAGS.good_5               |   48 +-
 test/manual/etags/c-src/emacs/src/keyboard.c |    4 +-
 test/manual/etags/c-src/emacs/src/lisp.h     |    4 +-
 test/manual/etags/c-src/etags.c              |    8 +-
 test/manual/indent/js.js                     |    7 +-
 test/manual/indent/ruby.rb                   |   15 +
 266 files changed, 1608 insertions(+), 1415 deletions(-)

diff --git a/admin/alloc-colors.c b/admin/alloc-colors.c
index 9f6161e..3158cf4 100644
--- a/admin/alloc-colors.c
+++ b/admin/alloc-colors.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/admin/notes/unicode b/admin/notes/unicode
index 51314b1..0b2ce90 100644
--- a/admin/notes/unicode
+++ b/admin/notes/unicode
@@ -10,7 +10,9 @@ Emacs uses the following files from the Unicode Character 
Database
 (a.k.a. "UCD):
 
   . UnicodeData.txt
+  . Blocks.txt
   . BidiMirroring.txt
+  . BidiBrackets.txt
   . IVD_Sequences.txt
 
 First, these files need to be copied into admin/unidata/, and then
@@ -37,6 +39,11 @@ Any new scripts added by UnicodeData.txt will also need 
updates to
 script-representative-chars defined in fontset.el.  Other databases in
 fontset.el might also need to be updated as needed.
 
+The function 'ucs-names', defined in lisp/international/mule-cmds.el,
+might need to be updated because it knows about used and unused ranges
+of Unicode codepoints, which a new release of the Unicode Standard
+could change.
+
 Problems, fixmes and other unicode-related issues
 -------------------------------------------------------------
 
diff --git a/configure.ac b/configure.ac
index 940a1e2..39ded74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3600,14 +3600,6 @@ if test "${HAVE_X11}" = "yes"; then
     fi
   fi
   if test $HAVE_XRANDR = yes; then
-    SAVE_CFLAGS="$CFLAGS"
-    SAVE_LIBS="$LIBS"
-    CFLAGS="$XRANDR_CFLAGS $CFLAGS"
-    LIBS="$XRANDR_LIBS $LIBS"
-    AC_CHECK_FUNCS(XRRGetOutputPrimary XRRGetScreenResourcesCurrent)
-    CFLAGS="$SAVE_CFLAGS"
-    LIBS="$SAVE_LIBS"
-
     AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have the XRandr extension.])
   fi
 fi
@@ -5116,8 +5108,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 10c1f73..459e844 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1265,14 +1265,14 @@ character sequences}.
 
 @kindex M-s ' @r{(Incremental Search)}
 @findex isearch-toggle-character-fold
-  Generally, search commands in Emacs by default perform character
-folding, thus matching equivalent character sequences.  You can
-disable this behavior by customizing the variable
address@hidden to @code{nil}.  @xref{Search
-Customizations}.  Within an incremental search, typing @kbd{M-s '}
-(@code{isearch-toggle-character-fold}) toggles character folding, but
-only for that search.  (Replace commands have a different default,
-controlled by a separate option; see @ref{Replacement and Lax
+  Generally, search commands in Emacs do not by default perform
+character folding in order to match equivalent character sequences.
+You can enable this behavior by customizing the variable
address@hidden to @code{character-fold-to-regexp}.
address@hidden Customizations}.  Within an incremental search, typing
address@hidden '} (@code{isearch-toggle-character-fold}) toggles character
+folding, but only for that search.  (Replace commands have a different
+default, controlled by a separate option; see @ref{Replacement and Lax
 Matches}.)
 
   Like with case folding, typing an explicit variant of a character,
@@ -1806,9 +1806,8 @@ do literal searches without character folding, but with 
case folding
 and lax-whitespace matches as determined by @code{case-fold-search}
 and @code{search-whitespace-regexp}, respectively (@pxref{Lax
 Search}).  If the value is @code{t}, incremental search defaults to
-regexp searches.  The default value specifies a function that causes
-the default search mode to perform character folding in addition to
-case folding and lax-whitespace matching.
+regexp searches.  The default value specifies a function that only
+performs case folding and lax-whitespace matching.
 
 @vindex search-highlight
   The current match of an on-going incremental search is highlighted
diff --git a/doc/man/etags.1 b/doc/man/etags.1
index 87353a1..d5fdc5f 100644
--- a/doc/man/etags.1
+++ b/doc/man/etags.1
@@ -139,10 +139,10 @@ May be used (only once) in place of a file name on the 
command line.
 \fBetags\fP will read from standard input and mark the produced tags
 as belonging to the file \fBFILE\fP.
 .TP
-\fB\-\-class\-qualify\fP
-Qualify tag names with their class name in C++, ObjC, and Java.
+\fB \-Q, \-\-class\-qualify\fP
+Qualify tag names with their class name in C++, ObjC, Java, and Perl.
 This produces tag names of the form \fIclass\fP\fB::\fP\fImember\fP
-for C++,
+for C++ and Perl,
 \fIclass\fP\fB(\fP\fIcategory\fP\fB)\fP for Objective C, and 
\fIclass\fP\fB.\fP\fImember\fP for Java.
 For Objective C, this also produces class methods qualified with
 their arguments, as in 
\fIfoo\fP\fB:\fP\fIbar\fP\fB:\fP\fIbaz\fP\fB:\fP\fImore\fP.
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 08baf5d..d04e2dd 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2016-02-16.15}
+\def\texinfoversion{2016-03-06.18}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1525,7 +1525,7 @@ output) for that.)}
   \def\pdfmkdest#1{{%
     % We have to set dummies so commands such as @code, and characters
     % such as \, aren't expanded when present in a section title.
-    \indexnofonts
+    \indexnofonts  % For avoiding UTF-16 convert issue of xdvipdfmx 20150315.
     \makevalueexpandable
     % In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
     % Therefore \txiescapepdf is not necessary.
@@ -1574,7 +1574,7 @@ output) for that.)}
       % In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
       % Therefore, the encoding and the language may not be considered.
       %
-      \indexnofonts
+      \indexnofonts % For avoiding UTF-16 convert issue of xdvipdfmx 20150315.
       \setupdatafile
       % We can have normal brace characters in the PDF outlines, unlike
       % Texinfo index files.  So set that up.
@@ -1591,16 +1591,11 @@ output) for that.)}
   ]
 
   \special{pdf:docview << /PageMode /UseOutlines >> }
-  \openin 1 uptex.tex % upTeX has UTF8-UTF16 cmap
-  \ifeof 1
-    % upTeX does not exist. To use UTF8-UCS2 cmap.
-    % In this case, non-BMP characters (over U+FFFF) can not be used.
-    \special{pdf:tounicode UTF8-UCS2}
-  \else
-    % upTeX exists. To use UTF8-UTF16 cmap.
-    % Non-BMP characters (over U+FFFF) can be used.
-    \special{pdf:tounicode UTF8-UTF16}
-  \fi
+  % ``\special{pdf:tounicode ...}'' is not necessary
+  % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
+  % However, due to UTF-16 convert issue of xdvipdfmx 20150315,
+  % ``\special{pdf:dest ...}'' can not handle non-ASCII strings.
+  % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
 \fi
 
 %
@@ -3477,13 +3472,16 @@ end
 \newif\ifseenauthor
 \newif\iffinishedtitlepage
 
-% Do an implicit @contents or @shortcontents after @end titlepage if the
-% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
-%
-\newif\ifsetcontentsaftertitlepage
- \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
-\newif\ifsetshortcontentsaftertitlepage
- \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+% @setcontentsaftertitlepage used to do an implicit @contents or
+% @shortcontents after @end titlepage, but it is now obsolete.
+\def\setcontentsaftertitlepage{%
+  address@hidden has been removed as a Texinfo
+              command; move your @contents command if you want the contents
+              after the title page.}}%
+\def\setshortcontentsaftertitlepage{%
+  address@hidden has been removed as a Texinfo
+              command; move your @shortcontents and @contents commands if you 
+              want the contents after the title page.}}%
 
 \parseargdef\shorttitlepage{%
   \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
@@ -3525,20 +3523,6 @@ end
   % Need this before the \...aftertitlepage checks so that if they are
   % in effect the toc pages will come out with page numbers.
   \HEADINGSon
-  %
-  % If they want short, they certainly want long too.
-  \ifsetshortcontentsaftertitlepage
-    \shortcontents
-    \contents
-    \global\let\shortcontents = \relax
-    \global\let\contents = \relax
-  \fi
-  %
-  \ifsetcontentsaftertitlepage
-    \contents
-    \global\let\contents = \relax
-    \global\let\shortcontents = \relax
-  \fi
 }
 
 \def\finishtitlepage{%
@@ -6371,30 +6355,6 @@ end
 }
 
 
-% I don't think this chapter style is supported any more, so I'm not
-% updating it with the new noderef stuff.  We'll see.  --karl, 11aug03.
-%
-\parseargdef\setchapterstyle{\csname CHAPF#1\endcsname}
-%
-\def\unnchfopen #1{%
-  \chapoddpage
-  \vbox{\chapfonts \raggedtitlesettings #1\par}%
-  \nobreak\bigskip\nobreak
-}
-\def\chfopen #1#2{\chapoddpage {\chapfonts
-\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
-\par\penalty 5000 %
-}
-\def\centerchfopen #1{%
-  \chapoddpage
-  \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
-  \nobreak\bigskip \nobreak
-}
-\def\CHAPFopen{%
-  \global\let\chapmacro=\chfopen
-  \global\let\centerchapmacro=\centerchfopen}
-
-
 % Section titles.  These macros combine the section number parts and
 % call the generic \sectionheading to do the printing.
 %
@@ -7839,7 +7799,7 @@ end
 % Argument is macro body with arguments substituted
 \def\scanmacro#1{%
   \newlinechar`\^^M
-  \def\xprocessmacroarg{\eatspaces}%
+  \def\xeatspaces{\eatspaces}%
   %
   % Process the macro body under the current catcode regime.
   \scantokens{#1\texinfoc}\aftermacro%
@@ -7935,7 +7895,7 @@ end
   \catcode`\_=\other
   \catcode`\|=\other
   \catcode`\~=\other
-  \ifx\declaredencoding\ascii \else \setcharscatcodeothernonglobal \fi
+  \passthroughcharstrue
 }
 
 \def\scanargctxt{% used for copying and captions, not macros.
@@ -8069,7 +8029,7 @@ end
   \paramno=0\def\paramlist{}%
   \let\hash\relax
   % \hash is redefined to `#' later to get it into definitions
-  \let\processmacroarg\relax
+  \let\xeatspaces\relax
   \parsemargdefxxx#1,;,%
   \ifnum\paramno<10\relax\else
     \paramno0\relax
@@ -8081,7 +8041,7 @@ end
   \else \let\next=\parsemargdefxxx
     \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
-        {\processmacroarg{\hash\the\paramno}}%
+        {\xeatspaces{\hash\the\paramno}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
   \fi\next}
 
@@ -8307,16 +8267,9 @@ end
 %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
 
 
-
-% Remove following spaces at the expansion stage.
-% This works because spaces are discarded before each argument when TeX is 
-% getting the arguments for a macro.
-% This must not be immediately followed by a }.
-\long\def\gobblespaces#1{#1}
-
 % This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
 %    \macrobody has the body of the macro in it, with placeholders for
-% its parameters, looking like "\processmacroarg{\hash 1}".
+% its parameters, looking like "\xeatspaces{\hash 1}".
 %    \paramno is the number of parameters
 %    \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
 % There are eight cases: recursive and nonrecursive macros of zero, one,
@@ -8327,14 +8280,13 @@ end
 \def\defmacro{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifnum\paramno=1
-    \def\processmacroarg{\gobblespaces}%
+    \def\xeatspaces##1{##1}%
     % This removes the pair of braces around the argument.  We don't
     % use \eatspaces, because this can cause ends of lines to be lost
     % when the argument to \eatspaces is read, leading to line-based
     % commands like "@itemize" not being read correctly.
   \else
-    \def\processmacroarg{\xprocessmacroarg}%
-    \let\xprocessmacroarg\relax
+    \let\xeatspaces\relax % suppress expansion
   \fi
   \ifrecursive   %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     \ifcase\paramno
@@ -8347,12 +8299,9 @@ end
          \noexpand\braceorline
          \expandafter\noexpand\csname\the\macname @@@\endcsname}%
       \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
-         \expandafter\noexpand\csname\the\macname @@@@\endcsname{%
-           \noexpand\gobblespaces##1\empty}%
-           % The \empty is for \gobblespaces in case #1 is empty
-         }%
-      \expandafter\xdef\csname\the\macname @@@@\endcsname##1{%
-         \egroup\noexpand\scanmacro{\macrobody}}%
+        \egroup
+        \noexpand\scanmacro{\macrobody}%
+        }%
     \else
       \ifnum\paramno<10\relax % at most 9
         % See non-recursive section below for comments
@@ -8391,11 +8340,6 @@ end
          \noexpand\braceorline
          \expandafter\noexpand\csname\the\macname @@@\endcsname}%
       \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
-         \expandafter\noexpand\csname\the\macname @@@@\endcsname{%
-           \noexpand\gobblespaces##1\empty}%
-           % The \empty is for \gobblespaces in case #1 is empty
-         }%
-      \expandafter\xdef\csname\the\macname @@@@\endcsname##1{%
         \egroup
         \noexpand\scanmacro{\macrobody}%
         }%
@@ -9049,9 +8993,6 @@ end
   % now.  --karl, 15jan04.
   \catcode`\\=\other
   %
-  % Make the characters 128-255 be printing characters.
-  {\setcharscatcodeothernonglobal}%
-  %
   % @ is our escape character in .aux files, and we need braces.
   \catcode`\{=1
   \catcode`\}=2
@@ -9815,109 +9756,119 @@ directory should work if nowhere else does.}
 % macros containing the character definitions.
 \setnonasciicharscatcode\active
 %
+
+\def\gdefchar#1#2{%
+\gdef#1{%
+   \ifpassthroughchars
+     \string#1%
+   \else
+     #2%
+   \fi
+}}
+
 % Latin1 (ISO-8859-1) character definitions.
 \def\latonechardefs{%
-  \gdef^^a0{\tie}
-  \gdef^^a1{\exclamdown}
-  \gdef^^a2{{\tcfont \char162}} % cent
-  \gdef^^a3{\pounds}
-  \gdef^^a4{{\tcfont \char164}} % currency
-  \gdef^^a5{{\tcfont \char165}} % yen
-  \gdef^^a6{{\tcfont \char166}} % broken bar
-  \gdef^^a7{\S}
-  \gdef^^a8{\"{}}
-  \gdef^^a9{\copyright}
-  \gdef^^aa{\ordf}
-  \gdef^^ab{\guillemetleft}
-  \gdef^^ac{\ensuremath\lnot}
-  \gdef^^ad{\-}
-  \gdef^^ae{\registeredsymbol}
-  \gdef^^af{\={}}
-  %
-  \gdef^^b0{\textdegree}
-  \gdef^^b1{$\pm$}
-  \gdef^^b2{$^2$}
-  \gdef^^b3{$^3$}
-  \gdef^^b4{\'{}}
-  \gdef^^b5{$\mu$}
-  \gdef^^b6{\P}
-  \gdef^^b7{\ensuremath\cdot}
-  \gdef^^b8{\cedilla\ }
-  \gdef^^b9{$^1$}
-  \gdef^^ba{\ordm}
-  \gdef^^bb{\guillemetright}
-  \gdef^^bc{$1\over4$}
-  \gdef^^bd{$1\over2$}
-  \gdef^^be{$3\over4$}
-  \gdef^^bf{\questiondown}
-  %
-  \gdef^^c0{\`A}
-  \gdef^^c1{\'A}
-  \gdef^^c2{\^A}
-  \gdef^^c3{\~A}
-  \gdef^^c4{\"A}
-  \gdef^^c5{\ringaccent A}
-  \gdef^^c6{\AE}
-  \gdef^^c7{\cedilla C}
-  \gdef^^c8{\`E}
-  \gdef^^c9{\'E}
-  \gdef^^ca{\^E}
-  \gdef^^cb{\"E}
-  \gdef^^cc{\`I}
-  \gdef^^cd{\'I}
-  \gdef^^ce{\^I}
-  \gdef^^cf{\"I}
-  %
-  \gdef^^d0{\DH}
-  \gdef^^d1{\~N}
-  \gdef^^d2{\`O}
-  \gdef^^d3{\'O}
-  \gdef^^d4{\^O}
-  \gdef^^d5{\~O}
-  \gdef^^d6{\"O}
-  \gdef^^d7{$\times$}
-  \gdef^^d8{\O}
-  \gdef^^d9{\`U}
-  \gdef^^da{\'U}
-  \gdef^^db{\^U}
-  \gdef^^dc{\"U}
-  \gdef^^dd{\'Y}
-  \gdef^^de{\TH}
-  \gdef^^df{\ss}
-  %
-  \gdef^^e0{\`a}
-  \gdef^^e1{\'a}
-  \gdef^^e2{\^a}
-  \gdef^^e3{\~a}
-  \gdef^^e4{\"a}
-  \gdef^^e5{\ringaccent a}
-  \gdef^^e6{\ae}
-  \gdef^^e7{\cedilla c}
-  \gdef^^e8{\`e}
-  \gdef^^e9{\'e}
-  \gdef^^ea{\^e}
-  \gdef^^eb{\"e}
-  \gdef^^ec{\`{\dotless i}}
-  \gdef^^ed{\'{\dotless i}}
-  \gdef^^ee{\^{\dotless i}}
-  \gdef^^ef{\"{\dotless i}}
-  %
-  \gdef^^f0{\dh}
-  \gdef^^f1{\~n}
-  \gdef^^f2{\`o}
-  \gdef^^f3{\'o}
-  \gdef^^f4{\^o}
-  \gdef^^f5{\~o}
-  \gdef^^f6{\"o}
-  \gdef^^f7{$\div$}
-  \gdef^^f8{\o}
-  \gdef^^f9{\`u}
-  \gdef^^fa{\'u}
-  \gdef^^fb{\^u}
-  \gdef^^fc{\"u}
-  \gdef^^fd{\'y}
-  \gdef^^fe{\th}
-  \gdef^^ff{\"y}
+  \gdefchar^^a0{\tie}
+  \gdefchar^^a1{\exclamdown}
+  \gdefchar^^a2{{\tcfont \char162}} % cent
+  \gdefchar^^a3{\pounds}
+  \gdefchar^^a4{{\tcfont \char164}} % currency
+  \gdefchar^^a5{{\tcfont \char165}} % yen
+  \gdefchar^^a6{{\tcfont \char166}} % broken bar
+  \gdefchar^^a7{\S}
+  \gdefchar^^a8{\"{}}
+  \gdefchar^^a9{\copyright}
+  \gdefchar^^aa{\ordf}
+  \gdefchar^^ab{\guillemetleft}
+  \gdefchar^^ac{\ensuremath\lnot}
+  \gdefchar^^ad{\-}
+  \gdefchar^^ae{\registeredsymbol}
+  \gdefchar^^af{\={}}
+  %
+  \gdefchar^^b0{\textdegree}
+  \gdefchar^^b1{$\pm$}
+  \gdefchar^^b2{$^2$}
+  \gdefchar^^b3{$^3$}
+  \gdefchar^^b4{\'{}}
+  \gdefchar^^b5{$\mu$}
+  \gdefchar^^b6{\P}
+  \gdefchar^^b7{\ensuremath\cdot}
+  \gdefchar^^b8{\cedilla\ }
+  \gdefchar^^b9{$^1$}
+  \gdefchar^^ba{\ordm}
+  \gdefchar^^bb{\guillemetright}
+  \gdefchar^^bc{$1\over4$}
+  \gdefchar^^bd{$1\over2$}
+  \gdefchar^^be{$3\over4$}
+  \gdefchar^^bf{\questiondown}
+  %
+  \gdefchar^^c0{\`A}
+  \gdefchar^^c1{\'A}
+  \gdefchar^^c2{\^A}
+  \gdefchar^^c3{\~A}
+  \gdefchar^^c4{\"A}
+  \gdefchar^^c5{\ringaccent A}
+  \gdefchar^^c6{\AE}
+  \gdefchar^^c7{\cedilla C}
+  \gdefchar^^c8{\`E}
+  \gdefchar^^c9{\'E}
+  \gdefchar^^ca{\^E}
+  \gdefchar^^cb{\"E}
+  \gdefchar^^cc{\`I}
+  \gdefchar^^cd{\'I}
+  \gdefchar^^ce{\^I}
+  \gdefchar^^cf{\"I}
+  %
+  \gdefchar^^d0{\DH}
+  \gdefchar^^d1{\~N}
+  \gdefchar^^d2{\`O}
+  \gdefchar^^d3{\'O}
+  \gdefchar^^d4{\^O}
+  \gdefchar^^d5{\~O}
+  \gdefchar^^d6{\"O}
+  \gdefchar^^d7{$\times$}
+  \gdefchar^^d8{\O}
+  \gdefchar^^d9{\`U}
+  \gdefchar^^da{\'U}
+  \gdefchar^^db{\^U}
+  \gdefchar^^dc{\"U}
+  \gdefchar^^dd{\'Y}
+  \gdefchar^^de{\TH}
+  \gdefchar^^df{\ss}
+  %
+  \gdefchar^^e0{\`a}
+  \gdefchar^^e1{\'a}
+  \gdefchar^^e2{\^a}
+  \gdefchar^^e3{\~a}
+  \gdefchar^^e4{\"a}
+  \gdefchar^^e5{\ringaccent a}
+  \gdefchar^^e6{\ae}
+  \gdefchar^^e7{\cedilla c}
+  \gdefchar^^e8{\`e}
+  \gdefchar^^e9{\'e}
+  \gdefchar^^ea{\^e}
+  \gdefchar^^eb{\"e}
+  \gdefchar^^ec{\`{\dotless i}}
+  \gdefchar^^ed{\'{\dotless i}}
+  \gdefchar^^ee{\^{\dotless i}}
+  \gdefchar^^ef{\"{\dotless i}}
+  %
+  \gdefchar^^f0{\dh}
+  \gdefchar^^f1{\~n}
+  \gdefchar^^f2{\`o}
+  \gdefchar^^f3{\'o}
+  \gdefchar^^f4{\^o}
+  \gdefchar^^f5{\~o}
+  \gdefchar^^f6{\"o}
+  \gdefchar^^f7{$\div$}
+  \gdefchar^^f8{\o}
+  \gdefchar^^f9{\`u}
+  \gdefchar^^fa{\'u}
+  \gdefchar^^fb{\^u}
+  \gdefchar^^fc{\"u}
+  \gdefchar^^fd{\'y}
+  \gdefchar^^fe{\th}
+  \gdefchar^^ff{\"y}
 }
 
 % Latin9 (ISO-8859-15) encoding character definitions.
@@ -9925,119 +9876,119 @@ directory should work if nowhere else does.}
   % Encoding is almost identical to Latin1.
   \latonechardefs
   %
-  \gdef^^a4{\euro}
-  \gdef^^a6{\v S}
-  \gdef^^a8{\v s}
-  \gdef^^b4{\v Z}
-  \gdef^^b8{\v z}
-  \gdef^^bc{\OE}
-  \gdef^^bd{\oe}
-  \gdef^^be{\"Y}
+  \gdefchar^^a4{\euro}
+  \gdefchar^^a6{\v S}
+  \gdefchar^^a8{\v s}
+  \gdefchar^^b4{\v Z}
+  \gdefchar^^b8{\v z}
+  \gdefchar^^bc{\OE}
+  \gdefchar^^bd{\oe}
+  \gdefchar^^be{\"Y}
 }
 
 % Latin2 (ISO-8859-2) character definitions.
 \def\lattwochardefs{%
-  \gdef^^a0{\tie}
-  \gdef^^a1{\ogonek{A}}
-  \gdef^^a2{\u{}}
-  \gdef^^a3{\L}
-  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
-  \gdef^^a5{\v L}
-  \gdef^^a6{\'S}
-  \gdef^^a7{\S}
-  \gdef^^a8{\"{}}
-  \gdef^^a9{\v S}
-  \gdef^^aa{\cedilla S}
-  \gdef^^ab{\v T}
-  \gdef^^ac{\'Z}
-  \gdef^^ad{\-}
-  \gdef^^ae{\v Z}
-  \gdef^^af{\dotaccent Z}
-  %
-  \gdef^^b0{\textdegree}
-  \gdef^^b1{\ogonek{a}}
-  \gdef^^b2{\ogonek{ }}
-  \gdef^^b3{\l}
-  \gdef^^b4{\'{}}
-  \gdef^^b5{\v l}
-  \gdef^^b6{\'s}
-  \gdef^^b7{\v{}}
-  \gdef^^b8{\cedilla\ }
-  \gdef^^b9{\v s}
-  \gdef^^ba{\cedilla s}
-  \gdef^^bb{\v t}
-  \gdef^^bc{\'z}
-  \gdef^^bd{\H{}}
-  \gdef^^be{\v z}
-  \gdef^^bf{\dotaccent z}
-  %
-  \gdef^^c0{\'R}
-  \gdef^^c1{\'A}
-  \gdef^^c2{\^A}
-  \gdef^^c3{\u A}
-  \gdef^^c4{\"A}
-  \gdef^^c5{\'L}
-  \gdef^^c6{\'C}
-  \gdef^^c7{\cedilla C}
-  \gdef^^c8{\v C}
-  \gdef^^c9{\'E}
-  \gdef^^ca{\ogonek{E}}
-  \gdef^^cb{\"E}
-  \gdef^^cc{\v E}
-  \gdef^^cd{\'I}
-  \gdef^^ce{\^I}
-  \gdef^^cf{\v D}
-  %
-  \gdef^^d0{\DH}
-  \gdef^^d1{\'N}
-  \gdef^^d2{\v N}
-  \gdef^^d3{\'O}
-  \gdef^^d4{\^O}
-  \gdef^^d5{\H O}
-  \gdef^^d6{\"O}
-  \gdef^^d7{$\times$}
-  \gdef^^d8{\v R}
-  \gdef^^d9{\ringaccent U}
-  \gdef^^da{\'U}
-  \gdef^^db{\H U}
-  \gdef^^dc{\"U}
-  \gdef^^dd{\'Y}
-  \gdef^^de{\cedilla T}
-  \gdef^^df{\ss}
-  %
-  \gdef^^e0{\'r}
-  \gdef^^e1{\'a}
-  \gdef^^e2{\^a}
-  \gdef^^e3{\u a}
-  \gdef^^e4{\"a}
-  \gdef^^e5{\'l}
-  \gdef^^e6{\'c}
-  \gdef^^e7{\cedilla c}
-  \gdef^^e8{\v c}
-  \gdef^^e9{\'e}
-  \gdef^^ea{\ogonek{e}}
-  \gdef^^eb{\"e}
-  \gdef^^ec{\v e}
-  \gdef^^ed{\'{\dotless{i}}}
-  \gdef^^ee{\^{\dotless{i}}}
-  \gdef^^ef{\v d}
-  %
-  \gdef^^f0{\dh}
-  \gdef^^f1{\'n}
-  \gdef^^f2{\v n}
-  \gdef^^f3{\'o}
-  \gdef^^f4{\^o}
-  \gdef^^f5{\H o}
-  \gdef^^f6{\"o}
-  \gdef^^f7{$\div$}
-  \gdef^^f8{\v r}
-  \gdef^^f9{\ringaccent u}
-  \gdef^^fa{\'u}
-  \gdef^^fb{\H u}
-  \gdef^^fc{\"u}
-  \gdef^^fd{\'y}
-  \gdef^^fe{\cedilla t}
-  \gdef^^ff{\dotaccent{}}
+  \gdefchar^^a0{\tie}
+  \gdefchar^^a1{\ogonek{A}}
+  \gdefchar^^a2{\u{}}
+  \gdefchar^^a3{\L}
+  \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}}
+  \gdefchar^^a5{\v L}
+  \gdefchar^^a6{\'S}
+  \gdefchar^^a7{\S}
+  \gdefchar^^a8{\"{}}
+  \gdefchar^^a9{\v S}
+  \gdefchar^^aa{\cedilla S}
+  \gdefchar^^ab{\v T}
+  \gdefchar^^ac{\'Z}
+  \gdefchar^^ad{\-}
+  \gdefchar^^ae{\v Z}
+  \gdefchar^^af{\dotaccent Z}
+  %
+  \gdefchar^^b0{\textdegree}
+  \gdefchar^^b1{\ogonek{a}}
+  \gdefchar^^b2{\ogonek{ }}
+  \gdefchar^^b3{\l}
+  \gdefchar^^b4{\'{}}
+  \gdefchar^^b5{\v l}
+  \gdefchar^^b6{\'s}
+  \gdefchar^^b7{\v{}}
+  \gdefchar^^b8{\cedilla\ }
+  \gdefchar^^b9{\v s}
+  \gdefchar^^ba{\cedilla s}
+  \gdefchar^^bb{\v t}
+  \gdefchar^^bc{\'z}
+  \gdefchar^^bd{\H{}}
+  \gdefchar^^be{\v z}
+  \gdefchar^^bf{\dotaccent z}
+  %
+  \gdefchar^^c0{\'R}
+  \gdefchar^^c1{\'A}
+  \gdefchar^^c2{\^A}
+  \gdefchar^^c3{\u A}
+  \gdefchar^^c4{\"A}
+  \gdefchar^^c5{\'L}
+  \gdefchar^^c6{\'C}
+  \gdefchar^^c7{\cedilla C}
+  \gdefchar^^c8{\v C}
+  \gdefchar^^c9{\'E}
+  \gdefchar^^ca{\ogonek{E}}
+  \gdefchar^^cb{\"E}
+  \gdefchar^^cc{\v E}
+  \gdefchar^^cd{\'I}
+  \gdefchar^^ce{\^I}
+  \gdefchar^^cf{\v D}
+  %
+  \gdefchar^^d0{\DH}
+  \gdefchar^^d1{\'N}
+  \gdefchar^^d2{\v N}
+  \gdefchar^^d3{\'O}
+  \gdefchar^^d4{\^O}
+  \gdefchar^^d5{\H O}
+  \gdefchar^^d6{\"O}
+  \gdefchar^^d7{$\times$}
+  \gdefchar^^d8{\v R}
+  \gdefchar^^d9{\ringaccent U}
+  \gdefchar^^da{\'U}
+  \gdefchar^^db{\H U}
+  \gdefchar^^dc{\"U}
+  \gdefchar^^dd{\'Y}
+  \gdefchar^^de{\cedilla T}
+  \gdefchar^^df{\ss}
+  %
+  \gdefchar^^e0{\'r}
+  \gdefchar^^e1{\'a}
+  \gdefchar^^e2{\^a}
+  \gdefchar^^e3{\u a}
+  \gdefchar^^e4{\"a}
+  \gdefchar^^e5{\'l}
+  \gdefchar^^e6{\'c}
+  \gdefchar^^e7{\cedilla c}
+  \gdefchar^^e8{\v c}
+  \gdefchar^^e9{\'e}
+  \gdefchar^^ea{\ogonek{e}}
+  \gdefchar^^eb{\"e}
+  \gdefchar^^ec{\v e}
+  \gdefchar^^ed{\'{\dotless{i}}}
+  \gdefchar^^ee{\^{\dotless{i}}}
+  \gdefchar^^ef{\v d}
+  %
+  \gdefchar^^f0{\dh}
+  \gdefchar^^f1{\'n}
+  \gdefchar^^f2{\v n}
+  \gdefchar^^f3{\'o}
+  \gdefchar^^f4{\^o}
+  \gdefchar^^f5{\H o}
+  \gdefchar^^f6{\"o}
+  \gdefchar^^f7{$\div$}
+  \gdefchar^^f8{\v r}
+  \gdefchar^^f9{\ringaccent u}
+  \gdefchar^^fa{\'u}
+  \gdefchar^^fb{\H u}
+  \gdefchar^^fc{\"u}
+  \gdefchar^^fd{\'y}
+  \gdefchar^^fe{\cedilla t}
+  \gdefchar^^ff{\dotaccent{}}
 }
 
 % UTF-8 character definitions.
@@ -10067,35 +10018,56 @@ directory should work if nowhere else does.}
   \fi
 }
 
+% Give non-ASCII bytes the active definitions for processing UTF-8 sequences
 \begingroup
   \catcode`\~13
+  \catcode`\$12
   \catcode`\"12
 
+  % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
+  % substituting ~ and $ with a character token of that value.
   \def\UTFviiiLoop{%
     \global\catcode\countUTFx\active
     \uccode`\~\countUTFx
+    \uccode`\$\countUTFx
     \uppercase\expandafter{\UTFviiiTmp}%
     \advance\countUTFx by 1
     \ifnum\countUTFx < \countUTFy
       \expandafter\UTFviiiLoop
     \fi}
 
+  % For bytes other than the first in a UTF-8 sequence.  Not expected to
+  % be expanded except when writing to auxiliary files.
+  \countUTFx = "80
+  \countUTFy = "C2
+  \def\UTFviiiTmp{%
+    \gdef~{
+        \ifpassthroughchars $\fi}}%
+  \UTFviiiLoop
+
   \countUTFx = "C2
   \countUTFy = "E0
   \def\UTFviiiTmp{%
-    \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+    \gdef~{%
+        \ifpassthroughchars $%
+        \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}%
   \UTFviiiLoop
 
   \countUTFx = "E0
   \countUTFy = "F0
   \def\UTFviiiTmp{%
-    \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+    \gdef~{%
+        \ifpassthroughchars $%
+        \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}%
   \UTFviiiLoop
 
   \countUTFx = "F0
   \countUTFy = "F4
   \def\UTFviiiTmp{%
-    \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+    \gdef~{%
+        \ifpassthroughchars $%
+        \else\expandafter\UTFviiiFourOctets\expandafter$\fi
+        }}%
   \UTFviiiLoop
 \endgroup
 
@@ -10134,9 +10106,10 @@ directory should work if nowhere else does.}
   \catcode`\~=13
   \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
     \countUTFz = "#1\relax
-    %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
     \begingroup
       \parseXMLCharref
+      %
+      % Access definitions of characters given UTF-8 sequences
       \def\UTFviiiTwoOctets##1##2{%
         \csname u8:##1\string ##2\endcsname}%
       \def\UTFviiiThreeOctets##1##2##3{%
@@ -10154,7 +10127,8 @@ directory should work if nowhere else does.}
       % define an additional control sequence for this code point.
       \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
     \endgroup}
-
+  %
+  % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp.
   \gdef\parseXMLCharref{%
     \ifnum\countUTFz < "A0\relax
       \errhelp = \EMsimple
@@ -10184,6 +10158,7 @@ directory should work if nowhere else does.}
     \uccode `#1\countUTFx
     \countUTFz = \countUTFy}
 
+  % Used to set \UTFviiiTmp to a UTF-8 byte sequence
   \gdef\parseUTFviiiB#1#2#3#4{%
     \advance\countUTFz by "#10\relax
     \uccode `#3\countUTFz
@@ -10937,84 +10912,17 @@ directory should work if nowhere else does.}
   \unicodechardefs
 }
 
-% Native Unicode (XeTeX and LuaTeX) catcode other non global definitions
-\def\nativeunicodecharscatcodeothernonglobal{%
-  \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeOther
-  \unicodechardefs
-}
-
-% Catcode (non-ASCII or native Unicode) are set to \other (non-global
-% assignments).
-\def\setcharscatcodeothernonglobal{%
-  \iftxiusebytewiseio
-    \setnonasciicharscatcodenonglobal\other
-  \else
-    \nativeunicodecharscatcodeothernonglobal
-  \fi
-}
-
 % US-ASCII character definitions.
 \def\asciichardefs{% nothing need be done
    \relax
 }
 
-% Redefine the active definitions of non-ASCII characters to expand to
-% non-active tokens with the same character code.
-\def\nonasciistringdefs{%
-  \setnonasciicharscatcode\active
-  \def\defstringchar##1{\def##1{\string##1}}%
-  %
-  \defstringchar^^80\defstringchar^^81\defstringchar^^82\defstringchar^^83%
-  \defstringchar^^84\defstringchar^^85\defstringchar^^86\defstringchar^^87%
-  \defstringchar^^88\defstringchar^^89\defstringchar^^8a\defstringchar^^8b%
-  \defstringchar^^8c\defstringchar^^8d\defstringchar^^8e\defstringchar^^8f%
-  %
-  \defstringchar^^90\defstringchar^^91\defstringchar^^92\defstringchar^^93%
-  \defstringchar^^94\defstringchar^^95\defstringchar^^96\defstringchar^^97%
-  \defstringchar^^98\defstringchar^^99\defstringchar^^9a\defstringchar^^9b%
-  \defstringchar^^9c\defstringchar^^9d\defstringchar^^9e\defstringchar^^9f%
-  %
-  \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3%
-  \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7%
-  \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab%
-  \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af%
-  %
-  \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3%
-  \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7%
-  \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb%
-  \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf%
-  %
-  \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3%
-  \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7%
-  \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb%
-  \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf%
-  %
-  \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3%
-  \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7%
-  \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db%
-  \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df%
-  %
-  \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3%
-  \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7%
-  \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb%
-  \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef%
-  %
-  \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3%
-  \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7%
-  \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb%
-  \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff%
-}
-
-% Write characters literally, instead of using active definitions for
+% Whether the active definitions of non-ASCII characters expand to
+% non-active tokens with the same character code.  This is used to
+% write characters literally, instead of using active definitions for
 % printing the correct glyphs.
-\def\passthroughcharacters{%
-  \iftxiusebytewiseio
-    \nonasciistringdefs
-  \else
-    \passthroughcharstrue
-  \fi
-}
-
+\newif\ifpassthroughchars
+\passthroughcharsfalse
 
 % define all the unicode characters we know about, for the sake of @U.
 \iftxinativeunicodecapable
@@ -11370,7 +11278,7 @@ directory should work if nowhere else does.}
 %
 address@hidden = @active
  @address@hidden
-   @passthroughcharacters
+   @passthroughcharstrue
    @address@hidden
    @let"address@hidden
    @address@hidden %$ font-lock fix
diff --git a/etc/DEBUG b/etc/DEBUG
index 41678b5..c2fb5ab 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -72,7 +72,7 @@ prompt, to unconditionally load the GDB init file.
 *** Use the Emacs GDB UI front-end
 
 We recommend using the GUI front-end for GDB provided by Emacs.  With
-it, you can start GDB by typing "M-x GDB RET".  This will suggest the
+it, you can start GDB by typing "M-x gdb RET".  This will suggest the
 default binary to debug; if you are going to start a new Emacs
 process, change it as needed to point to the correct binary.
 Alternatively, if you want to attach the debugger to an already
diff --git a/etc/NEWS b/etc/NEWS
index b651b9e..9695a55 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -161,6 +161,16 @@ that negotiation should complete even on non-blocking 
sockets.
 `window-pixel-height-before-size-change' allow to detect which window
 changed size when `window-size-change-functions' are run.
 
++++
+** New function `display-buffer-reuse-mode-window' is an action function
+suitable for use in `display-buffer-alist'. For example, to avoid creating
+a new window when opening man pages when there's already one, use
+(add-to-list 'display-buffer-alist
+     '("\\`\\*Man .*\\*\\'" .
+       (display-buffer-reuse-mode-window
+        (inhibit-same-window . nil)
+        (mode . Man-mode))))
+
 
 * Changes in Emacs 25.2 on Non-Free Operating Systems
 
@@ -794,30 +804,30 @@ item as before.
 
 +++
 *** `isearch' and `query-replace' can now perform character folding in matches.
-Isearch does that by default, while `query-replace' will do that if
-the new variable `replace-character-fold' is customized to a non-nil
-value.  This is analogous to case folding, but instead of disregarding
-case variants, it disregards wider classes of distinctions between
-similar characters.  (Case folding is a special case of character
-folding.)  This means many characters in the search string will match
-entire groups of characters instead of just themselves.
-
-For instance, the " will match all variants of double quotes (like “
-and ”), and the letter a will match all of its accented cousins, even
-those composed of multiple characters, as well as many other symbols
-like ℀, ℁, ⒜, and ⓐ.
+This is analogous to case folding, but instead of disregarding case
+variants, it disregards wider classes of distinctions between similar
+characters.  (Case folding is a special case of character folding.)
+This means many characters in the search string will match entire
+groups of characters instead of just themselves.
+
+For instance, the ASCII double quote character " will match all
+variants of double quotes (like “ and ”), and the letter a will match
+all of its accented cousins, even those composed of multiple
+characters, as well as many other symbols like ℀, ℁, ⒜, and ⓐ.
 
 Character folding is enabled by customizing `search-default-mode' to
-the value `character-fold-to-regexp'.  If you want to turn character
-folding off, customize the value of `search-default-mode' to the `nil'
-value.  You can also toggle character folding in the middle of a
-search by typing `M-s ''.
+the value `character-fold-to-regexp'.  You can also toggle character
+folding in the middle of a search by typing `M-s ''.
+
+`query-replace' honors character folding if the new variable
+`replace-character-fold' is customized to a non-nil value.
 
 +++
 *** New user option `search-default-mode'.
 This option specifies the default mode for Isearch.  The default
-value, `character-fold-to-regexp' specifies that Isearch should fold
-characters when searching.
+value, nil specifies that Isearch does literal searches (however,
+`case-fold-search' and `isearch-lax-whitespace' may still be applied,
+as in previous Emacs versions).
 
 +++
 *** New function `character-fold-to-regexp' can be used
@@ -2186,7 +2196,7 @@ Those features have been deprecated in Gtk+ for a long 
time.
 +++
 *** etags no longer qualifies class members by default.
 
-By default, `etags' will not qualify class members for C-like
+By default, `etags' will not qualify class members for Perl and C-like
 object-oriented languages with their class names and namespaces, and
 will remove qualifications used explicitly in the code from the tag
 names it puts in TAGS files.  This is so the etags.el back-end for
@@ -2194,8 +2204,8 @@ names it puts in TAGS files.  This is so the etags.el 
back-end for
 positives.
 
 Use --class-qualify (-Q) if you want the old default behavior of
-qualifying class members in C++, Java, and Objective C.  Note that
-using -Q might make some class members become "unknown" to `M-.'
+qualifying class members in C++, Java, Objective C, and Perl.  Note
+that using -Q might make some class members become "unknown" to `M-.'
 (`xref-find-definitions'); if so, you can use `C-u M-.' to specify the
 qualified names by hand.
 
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index cb09ab8..c59181f 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index c7cef8a..dd66d34 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 796adaa..a822149 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -35,8 +35,8 @@ This file is not considered part of GNU Emacs.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -680,8 +680,8 @@ static const char *Objc_suffixes [] =
 static const char Objc_help [] =
 "In Objective C code, tags include Objective C definitions for classes,\n\
 class categories, methods and protocols.  Tags for variables and\n\
-functions in classes are named 'CLASS::VARIABLE' and 'CLASS::FUNCTION'.\n\
-(Use --help --lang=c --lang=objc --lang=java for full help.)";
+functions in classes are named 'CLASS::VARIABLE' and 'CLASS::FUNCTION'.\
+\n(Use --help --lang=c --lang=objc --lang=java for full help.)";
 
 static const char *Pascal_suffixes [] =
   { "p", "pas", NULL };
@@ -972,11 +972,12 @@ Relative ones are stored relative to the output file's 
directory.\n");
        in some languages.");
 
   puts ("-Q, --class-qualify\n\
-        Qualify tag names with their class name in C++, ObjC, and Java.\n\
+        Qualify tag names with their class name in C++, ObjC, Java, and 
Perl.\n\
         This produces tag names of the form \"class::member\" for C++,\n\
         \"class(category)\" for Objective C, and \"class.member\" for Java.\n\
         For Objective C, this also produces class methods qualified with\n\
-        their arguments, as in \"foo:bar:baz:more\".");
+        their arguments, as in \"foo:bar:baz:more\".\n\
+        For Perl, this produces \"package::member\".");
   puts ("-r REGEXP, --regex=REGEXP or address@hidden
         Make a tag for each line matching a regular expression pattern\n\
        in the following files.  {LANGUAGE}REGEXP uses REGEXP for LANGUAGE\n\
@@ -4535,10 +4536,21 @@ Perl_functions (FILE *inf)
            continue;           /* nothing found */
          pos = strchr (sp, ':');
          if (pos && pos < cp && pos[1] == ':')
-           /* The name is already qualified. */
-           make_tag (sp, cp - sp, true,
-                     lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
-         else
+           {
+             /* The name is already qualified. */
+             if (!class_qualify)
+               {
+                 char *q = pos + 2, *qpos;
+                 while ((qpos = strchr (q, ':')) != NULL
+                        && qpos < cp
+                        && qpos[1] == ':')
+                   q = qpos + 2;
+                 sp = q;
+               }
+             make_tag (sp, cp - sp, true,
+                       lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+           }
+         else if (class_qualify)
            /* Qualify it. */
            {
              char savechar, *name;
@@ -4551,6 +4563,9 @@ Perl_functions (FILE *inf)
                        lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
              free (name);
            }
+         else
+           make_tag (sp, cp - sp, true,
+                     lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
        }
       else if (LOOKING_AT (cp, "use constant")
               || LOOKING_AT (cp, "use constant::defer"))
diff --git a/lib-src/hexl.c b/lib-src/hexl.c
index 833ea50..9a5ca7e 100644
--- a/lib-src/hexl.c
+++ b/lib-src/hexl.c
@@ -1,15 +1,14 @@
 /* Convert files for Emacs Hexl mode.
    Copyright (C) 1989, 2001-2016 Free Software Foundation, Inc.
 
-Author: Keith Gabryelski
-(according to authors.el)
+Author: Keith Gabryelski (according to authors.el)
 
 This file is not considered part of GNU Emacs.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index e266207..32e3817 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index eb1962a..90e683e 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -799,6 +799,51 @@ mbx_write (char *line, int len, FILE *mbf)
   return fwrite (line, 1, len, mbf) == len && 0 <= fputc ('\n', mbf);
 }
 
+#ifdef WINDOWSNT
+/* Work around MS-Windows lack of support for %e or %T with a
+   special-purpose strftime that assumes the exact format that
+   movemail uses.  */
+static size_t
+movemail_strftime (char *s, size_t size, char const *format,
+                  struct tm const *tm)
+{
+  char fmt[size + 6], *q;
+  const char *p;
+
+  for (p = format, q = &fmt[0]; *p; )
+    {
+      if (*p == '%' && p[1] == 'e')
+       {
+         memcpy (q, "%d", 2);
+         q += 2;
+         p += 2;
+       }
+      else if (*p == '%' && p[1] == 'T')
+       {
+         memcpy (q, "%H:%M:%S", 8);
+         q += 8;
+         p += 2;
+       }
+      else if (*p == '%' && p[1] == '%')
+       {
+         memcpy (q, p, 2);
+         q += 2;
+         p += 2;
+       }
+      else
+       *q++ = *p++;
+    }
+
+  size_t n = strftime (s, size, fmt, tm);
+  char *mday = s + sizeof "From movemail Sun Jan " - 1;
+  if (*mday == '0')
+    *mday = ' ';
+  return n;
+}
+# undef strftime
+# define strftime movemail_strftime
+#endif
+
 static bool
 mbx_delimit_begin (FILE *mbf)
 {
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index 931a3ab..4b25796 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -9,8 +9,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h
index a0c0d43..b49da79 100644
--- a/lib-src/ntlib.h
+++ b/lib-src/ntlib.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -102,4 +102,3 @@ int mkostemp (char * template, int flags);
 #undef _WINSOCK_H
 
 /* end of ntlib.h */
-
diff --git a/lib-src/pop.c b/lib-src/pop.c
index 9839934..74a6fc1 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -9,8 +9,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/pop.h b/lib-src/pop.h
index 4c67bdc..b8c21fc 100644
--- a/lib-src/pop.h
+++ b/lib-src/pop.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/profile.c b/lib-src/profile.c
index da6232a..0e60377 100644
--- a/lib-src/profile.c
+++ b/lib-src/profile.c
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 3803a31..7675e9b 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lib/intprops.h b/lib/intprops.h
index e1a6107..a278497 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -1,10 +1,10 @@
 /* intprops.h -- properties of integer types
 
-   Copyright (C) 2001-2005, 2009-2016 Free Software Foundation, Inc.
+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 0730754..2c77356 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -269,6 +269,7 @@ set_acls_from_mode (const char *name, int desc, mode_t 
mode, bool *must_chmod)
          }
        return -1;
       }
+    return 0;
   }
 }
 
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 07d9ac9..525e3e2 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -565,7 +565,12 @@ If COMP or STD is non-nil, put that in the units table 
instead."
 (defun calc-convert-temperature (&optional old-units new-units)
   (interactive)
   (calc-slow-wrapper
-   (let ((expr (calc-top-n 1))
+   (let ((tempunits (delq nil
+                          (mapcar
+                           (lambda (x)
+                             (if (nth 3 x) (car x)))
+                           math-standard-units)))
+         (expr (calc-top-n 1))
         (uold nil)
         (uoldname nil)
         unew
@@ -580,15 +585,16 @@ If COMP or STD is non-nil, put that in the units table 
instead."
                                                     (car units)))))
                            (error "Not a pure temperature expression"))
                        (math-read-expr
-                        (setq uoldname (read-string
-                                        "Old temperature units: ")))))))
+                        (setq uoldname (completing-read
+                                        "Old temperature units: "
+                                         tempunits)))))))
      (when (eq (car-safe uold) 'error)
        (error "Bad format in units expression: %s" (nth 2 uold)))
      (or (math-units-in-expr-p expr nil)
         (setq expr (math-mul expr uold)))
      (setq defunits (math-get-default-units expr))
      (setq unew (or new-units
-                    (read-string
+                    (completing-read
                      (concat
                       (if uoldname
                           (concat "Old temperature units: "
@@ -599,7 +605,8 @@ If COMP or STD is non-nil, put that in the units table 
instead."
                           (concat " (default "
                                   defunits
                                   "): ")
-                        ": ")))))
+                        ": "))
+                     tempunits)))
      (setq unew (math-read-expr (if (string= unew "") defunits unew)))
      (when (eq (car-safe unew) 'error)
        (error "Bad format in units expression: %s" (nth 2 unew)))
diff --git a/lisp/cedet/semantic/symref/grep.el 
b/lisp/cedet/semantic/symref/grep.el
index 3b544d9..5d1fea8 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -48,6 +48,8 @@ and those hits returned.")
     (html-mode "*.s?html" "*.php")
     (ruby-mode "*.r[bu]" "*.rake" "*.gemspec" "*.erb" "*.haml"
                "Rakefile" "Thorfile" "Capfile" "Guardfile" "Vagrantfile")
+    (perl-mode "*.pl" "*.PL")
+    (cperl-mode "*.pl" "*.PL")
     )
   "List of major modes and file extension pattern.
 See find -name man page for format.")
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 3557041..d9f36b1 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -546,8 +546,8 @@ See also `dabbrev-abbrev-char-regexp' and 
\\[dabbrev-completion]."
                (copy-marker dabbrev--last-expansion-location)))
       ;; Success: stick it in and return.
       (setq buffer-undo-list (cons orig-point buffer-undo-list))
-      (dabbrev--substitute-expansion old abbrev expansion
-                                    record-case-pattern)
+      (setq expansion (dabbrev--substitute-expansion old abbrev expansion
+                                                     record-case-pattern))
 
       ;; Save state for re-expand.
       (setq dabbrev--last-expansion expansion)
@@ -902,7 +902,9 @@ to record whether we upcased the expansion, downcased it, 
or did neither."
     ;; and (2) the replacement itself is all lower case.
     (dabbrev--safe-replace-match expansion
                                 (not use-case-replace)
-                                t)))
+                                t))
+  ;; Return the expansion actually used.
+  expansion)
 
 
 ;;;----------------------------------------------------------------
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 8d57c19..b4bb3b0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -411,8 +411,8 @@ This will generate compile-time constants from BINDINGS."
          ;; Words inside \\[] tend to be for `substitute-command-keys'.
          (,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]")
           (1 font-lock-constant-face prepend))
-         ;; Words inside ‘’ and '' and `' tend to be symbol names.
-         (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
+         ;; Words inside ‘’ and `' tend to be symbol names.
+         (,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
                    lisp-mode-symbol-regexp "\\)['’]")
           (1 font-lock-constant-face prepend))
          ;; Constant values.
@@ -463,8 +463,8 @@ This will generate compile-time constants from BINDINGS."
          ;; Erroneous structures.
          (,(concat "(" cl-errs-re "\\_>")
            (1 font-lock-warning-face))
-         ;; Words inside ‘’ and '' and `' tend to be symbol names.
-         (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
+         ;; Words inside ‘’ and `' tend to be symbol names.
+         (,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
                    lisp-mode-symbol-regexp "\\)['’]")
           (1 font-lock-constant-face prepend))
          ;; Constant values.
diff --git a/lisp/files.el b/lisp/files.el
index 9b045a8..bd9792a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6843,8 +6843,8 @@ If CHAR is in [Xugo], the value is taken from FROM (or 0 
if omitted)."
   (cond ((= char ?r) #o0444)
        ((= char ?w) #o0222)
        ((= char ?x) #o0111)
-       ((= char ?s) #o1000)
-       ((= char ?t) #o6000)
+       ((= char ?s) #o6000)
+       ((= char ?t) #o1000)
        ;; Rights relative to the previous file modes.
        ((= char ?X) (if (= (logand from #o111) 0) 0 #o0111))
        ((= char ?u) (let ((uright (logand #o4700 from)))
@@ -6900,7 +6900,7 @@ as in \"og+rX-w\"."
                                  (mapcar 'file-modes-char-to-who
                                          (match-string 1 modes)))))
              (when (= num-who 0)
-               (setq num-who (default-file-modes)))
+               (setq num-who (logior #o7000 (default-file-modes))))
              (setq num-modes
                    (file-modes-rights-to-number (substring modes (match-end 1))
                                                 num-who num-modes)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 2df847a..dc96990 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2935,11 +2935,15 @@ on encoding."
               (#xA000 . #xD7FF)
               ;; (#xD800 . #xFAFF) Surrogate/Private
               (#xFB00 . #x134FF)
-              ;; (#x13500 . #x167FF) unused
-              (#x16800 . #x16A3F)
-              ;; (#x16A40 . #x1AFFF) unused
+              ;; (#x13500 . #x143FF) unused
+               (#x14400 . #x14646)
+              ;; (#x14647 . #x167FF) unused
+              (#x16800 . #x16F9F)
+              ;; (#x16FA0 . #x1AFFF) unused
               (#x1B000 . #x1B0FF)
-              ;; (#x1B100 . #x1CFFF) unused
+              ;; (#x1B100 . #x1BBFF) unused
+               (#x1BC00 . #x1BCAF)
+              ;; (#x1BCB0 . #x1CFFF) unused
               (#x1D000 . #x1FFFF)
               ;; (#x20000 . #xDFFFF) CJK Ideograph Extension A, B, etc, unused
               (#xE0000 . #xE01FF)))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 2efa4c7..b8ada2c 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -224,7 +224,7 @@ Default value, nil, means edit the string instead."
 
 (autoload 'character-fold-to-regexp "character-fold")
 
-(defcustom search-default-mode #'character-fold-to-regexp
+(defcustom search-default-mode nil
   "Default mode to use when starting isearch.
 Value is nil, t, or a function.
 
@@ -1528,7 +1528,9 @@ The command then executes BODY and updates the isearch 
prompt."
                   (if docstring (concat "\n" docstring) ""))
          (interactive)
          ,@(when function
-             `((setq isearch-regexp-function #',function)
+             `((setq isearch-regexp-function
+                     (unless (eq isearch-regexp-function #',function)
+                       #',function))
                (setq isearch-regexp nil)))
          ,@body
          (setq isearch-success t isearch-adjusted t)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 68b3cfd..2992610 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2800,7 +2800,12 @@ The current mail message becomes the message displayed."
          ;; rmail-header-style based on the binding in effect when
          ;; this function is called; `rmail-toggle-headers' can
          ;; inspect this value to determine how to toggle.
-         (set (make-local-variable 'rmail-header-style) header-style))
+         (set (make-local-variable 'rmail-header-style) header-style)
+          ;; In case viewing the previous message sets the paragraph
+          ;; direction non-nil, we reset it here to allow independent
+          ;; dynamic determination of paragraph direction in every
+          ;; message.
+          (setq bidi-paragraph-direction nil))
        (if (and rmail-enable-mime
                 rmail-show-mime-function
                 (re-search-forward "mime-version: 1.0" nil t))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c2ab67b..4ff21c1 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4120,44 +4120,36 @@ process to set up.  VEC specifies the connection."
   ;; CCC this can't be the right way to do it.  Hm.
   (tramp-message vec 5 "Determining coding system")
   (with-current-buffer (process-buffer proc)
-    (if (featurep 'mule)
-       ;; Use MULE to select the right EOL convention for communicating
-       ;; with the process.
-       (let ((cs (or (and (memq 'utf-8 (coding-system-list))
-                          (string-match "utf-?8" (tramp-get-remote-locale vec))
-                          (cons 'utf-8 'utf-8))
-                     (process-coding-system proc)
-                     (cons 'undecided 'undecided)))
-             cs-decode cs-encode)
-         (when (symbolp cs) (setq cs (cons cs cs)))
-         (setq cs-decode (or (car cs) 'undecided)
-                cs-encode (or (cdr cs) 'undecided))
-         (setq cs-encode
-               (coding-system-change-eol-conversion
-                cs-encode
-                (if (string-match
-                     "^Darwin" (tramp-get-connection-property vec "uname" ""))
-                    'mac 'unix)))
-         (tramp-send-command vec "echo foo ; echo bar" t)
-         (goto-char (point-min))
-         (when (search-forward "\r" nil t)
-           (setq cs-decode (coding-system-change-eol-conversion
-                            cs-decode 'dos)))
-          ;; Special setting for Mac OS X.
-          (when (and (string-match
-                      "^Darwin" (tramp-get-connection-property vec "uname" ""))
-                     (memq 'utf-8-hfs (coding-system-list)))
-            (setq cs-decode 'utf-8-hfs
-                  cs-encode 'utf-8-hfs))
-         (set-buffer-process-coding-system cs-decode cs-encode)
-         (tramp-message
-          vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))
-      ;; Look for ^M and do something useful if found.
+    ;; Use MULE to select the right EOL convention for communicating
+    ;; with the process.
+    (let ((cs (or (and (memq 'utf-8 (coding-system-list))
+                      (string-match "utf-?8" (tramp-get-remote-locale vec))
+                      (cons 'utf-8 'utf-8))
+                 (process-coding-system proc)
+                 (cons 'undecided 'undecided)))
+         cs-decode cs-encode)
+      (when (symbolp cs) (setq cs (cons cs cs)))
+      (setq cs-decode (or (car cs) 'undecided)
+           cs-encode (or (cdr cs) 'undecided)
+           cs-encode
+           (coding-system-change-eol-conversion
+            cs-encode
+            (if (string-match
+                 "^Darwin" (tramp-get-connection-property vec "uname" ""))
+                'mac 'unix)))
+      (tramp-send-command vec "echo foo ; echo bar" t)
+      (goto-char (point-min))
       (when (search-forward "\r" nil t)
-       ;; We have found a ^M but cannot frob the process coding system
-       ;; because we're running on a non-MULE Emacs.  Let's try
-       ;; stty, instead.
-       (tramp-send-command vec "stty -onlcr" t))))
+       (setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos)))
+      ;; Special setting for Mac OS X.
+      (when (and (string-match
+                 "^Darwin" (tramp-get-connection-property vec "uname" ""))
+                (memq 'utf-8-hfs (coding-system-list)))
+       (setq cs-decode 'utf-8-hfs
+             cs-encode 'utf-8-hfs))
+      (set-buffer-process-coding-system cs-decode cs-encode)
+      (tramp-message
+       vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)))
 
   (tramp-send-command vec "set +o vi +o emacs" t)
 
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 0784948..1e5cc60 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1758,12 +1758,13 @@ This performs fontification according to 
`js--class-styles'."
                     (eq (char-after) ??))))
          (not (and
                (eq (char-after) ?*)
-               (looking-at (concat "\\* *" js--name-re " *("))
+               ;; Generator method (possibly using computed property).
+               (looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)"))
                (save-excursion
-                 (goto-char (1- (match-end 0)))
-                 (let (forward-sexp-function) (forward-sexp))
-                 (js--forward-syntactic-ws)
-                 (eq (char-after) ?{)))))))
+                 (js--backward-syntactic-ws)
+                 ;; We might misindent some expressions that would
+                 ;; return NaN anyway.  Shouldn't be a problem.
+                 (memq (char-before) '(?, ?} ?{))))))))
 
 (defun js--continued-expression-p ()
   "Return non-nil if the current line continues an expression."
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index fb942b3..d237074 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -420,7 +420,10 @@ It is used when `ruby-encoding-magic-comment-style' is set 
to `custom'."
 
 (defun ruby-smie--bosp ()
   (save-excursion (skip-chars-backward " \t")
-                  (or (bolp) (memq (char-before) '(?\; ?=)))))
+                  (or (and (bolp)
+                           ;; Newline is escaped.
+                           (not (eq (char-before (1- (point))) ?\\)))
+                      (memq (char-before) '(?\; ?=)))))
 
 (defun ruby-smie--implicit-semi-p ()
   (save-excursion
@@ -428,17 +431,11 @@ It is used when `ruby-encoding-magic-comment-style' is 
set to `custom'."
     (not (or (bolp)
              (memq (char-before) '(?\[ ?\())
              (and (memq (char-before)
-                        '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\\ ?& ?> ?< ?% ?~ ?^))
-                  ;; Not a binary operator symbol.
-                  (not (eq (char-before (1- (point))) ?:))
-                  ;; Not the end of a regexp or a percent literal.
-                  (not (memq (car (syntax-after (1- (point)))) '(7 15))))
-             (and (eq (char-before) ?\?)
-                  (equal (save-excursion (ruby-smie--backward-token)) "?"))
-             (and (eq (char-before) ?=)
-                  ;; Not a symbol :==, :!=, or a foo= method.
-                  (string-match "\\`\\s." (save-excursion
-                                            (ruby-smie--backward-token))))
+                        '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\\ ?& ?> ?< ?% ?~ ?^ ?= 
??))
+                  ;; Not a binary operator symbol like :+ or :[]=.
+                  ;; Or a (method or symbol) name ending with ?.
+                  ;; Or the end of a regexp or a percent literal.
+                  (not (memq (car (syntax-after (1- (point)))) '(3 7 15))))
              (and (eq (char-before) ?|)
                   (member (save-excursion (ruby-smie--backward-token))
                           '("|" "||")))
@@ -482,12 +479,16 @@ It is used when `ruby-encoding-magic-comment-style' is 
set to `custom'."
                                              "else" "elsif" "do" "end" "and")
                                            'symbols))))
          (memq (car (syntax-after pos)) '(7 15))
-         (looking-at "[([]\\|[-+!~]\\sw\\|:\\(?:\\sw\\|\\s.\\)")))))
+         (looking-at "[([]\\|[-+!~:]\\(?:\\sw\\|\\s_\\)")))))
 
-(defun ruby-smie--at-dot-call ()
+(defun ruby-smie--before-method-name ()
+  ;; Only need to be accurate when method has keyword name.
   (and (eq ?w (char-syntax (following-char)))
-       (eq (char-before) ?.)
-       (not (eq (char-before (1- (point))) ?.))))
+       (or
+        (and
+         (eq (char-before) ?.)
+         (not (eq (char-before (1- (point))) ?.)))
+        (looking-back "^\\s *def\\s +\\=" (line-beginning-position)))))
 
 (defun ruby-smie--forward-token ()
   (let ((pos (point)))
@@ -508,11 +509,9 @@ It is used when `ruby-encoding-magic-comment-style' is set 
to `custom'."
              (save-excursion
                (ruby-smie--args-separator-p (prog1 (point) (goto-char pos)))))
         " @ ")
-       ((looking-at ":\\s.+")
-        (goto-char (match-end 0)) (match-string 0)) ;bug#15208.
        ((looking-at "\\s\"") "")                    ;A string.
        (t
-        (let ((dot (ruby-smie--at-dot-call))
+        (let ((dot (ruby-smie--before-method-name))
               (tok (smie-default-forward-token)))
           (when dot
             (setq tok (concat "." tok)))
@@ -556,11 +555,9 @@ It is used when `ruby-encoding-magic-comment-style' is set 
to `custom'."
       " @ ")
      (t
       (let ((tok (smie-default-backward-token))
-            (dot (ruby-smie--at-dot-call)))
+            (dot (ruby-smie--before-method-name)))
         (when dot
           (setq tok (concat "." tok)))
-        (when (and (eq ?: (char-before)) (string-match "\\`\\s." tok))
-          (forward-char -1) (setq tok (concat ":" tok))) ;; bug#15208.
         (cond
          ((member tok '("unless" "if" "while" "until"))
           (if (ruby-smie--bosp)
@@ -669,7 +666,7 @@ It is used when `ruby-encoding-magic-comment-style' is set 
to `custom'."
      ;; Align to the previous `when', but look up the virtual
      ;; indentation of `case'.
      (if (smie-rule-sibling-p) 0 (smie-rule-parent)))
-    (`(:after . ,(or "=" "iuwu-mod" "+" "-" "*" "/" "&&" "||" "%" "**" "^" "&"
+    (`(:after . ,(or "=" "+" "-" "*" "/" "&&" "||" "%" "**" "^" "&"
                      "<=>" ">" "<" ">=" "<=" "==" "===" "!=" "<<" ">>"
                      "+=" "-=" "*=" "/=" "%=" "**=" "&=" "|=" "^=" "|"
                      "<<=" ">>=" "&&=" "||=" "and" "or"))
@@ -682,6 +679,8 @@ It is used when `ruby-encoding-magic-comment-style' is set 
to `custom'."
        (if (ruby-smie--indent-to-stmt-p token)
            (ruby-smie--indent-to-stmt)
          (cons 'column (current-column)))))
+    (`(:before . "iuwu-mod")
+     (smie-rule-parent ruby-indent-level))
     ))
 
 (defun ruby--at-indentation-p (&optional point)
@@ -889,12 +888,18 @@ and `\\' when preceded by `?'."
           ((and (eq c ?:) (or (not b) (eq (char-syntax b) ? ))))
           ((eq c ?\\) (eq b ??)))))
 
-(defun ruby-singleton-class-p (&optional pos)
+(defun ruby-verify-heredoc (&optional pos)
   (save-excursion
     (when pos (goto-char pos))
-    (forward-word -1)
-    (and (or (bolp) (not (eq (char-before (point)) ?_)))
-         (looking-at ruby-singleton-class-re))))
+    ;; Not right after a symbol or prefix character.
+    ;; Method names are only allowed when separated by
+    ;; whitespace.  Not a limitation in Ruby, but it's hard for
+    ;; us to do better.
+    (when (not (memq (car (syntax-after (1- (point)))) '(2 3 6 10)))
+      (or (not (memq (char-before) '(?\s ?\t)))
+          (ignore (forward-word -1))
+          (eq (char-before) ?_)
+          (not (looking-at ruby-singleton-class-re))))))
 
 (defun ruby-expr-beg (&optional option)
   "Check if point is possibly at the beginning of an expression.
@@ -914,7 +919,7 @@ Can be one of `heredoc', `modifier', `expr-qstr', 
`expr-re'."
         nil)
        ((looking-at ruby-operator-re))
        ((eq option 'heredoc)
-        (and (< space 0) (not (ruby-singleton-class-p start))))
+        (and (< space 0) (ruby-verify-heredoc start)))
        ((or (looking-at "[\\[({,;]")
             (and (looking-at "[!?]")
                  (or (not (eq option 'modifier))
@@ -1842,17 +1847,22 @@ It will be properly highlighted even when the call 
omits parens.")
      (syntax-propertize-rules
       ;; $' $" $` .... are variables.
       ;; ?' ?" ?` are character literals (one-char strings in 1.9+).
-      ("\\([?$]\\)[#\"'`]"
+      ("\\([?$]\\)[#\"'`:?]"
        (1 (if (save-excursion
                 (nth 3 (syntax-ppss (match-beginning 0))))
               ;; Within a string, skip.
-              (goto-char (match-end 1))
-            (string-to-syntax "\\"))))
-      ;; Part of symbol when at the end of a method name.
+              (ignore
+               (goto-char (match-end 1)))
+            (put-text-property (match-end 1) (match-end 0)
+                               'syntax-table (string-to-syntax "_"))
+            (string-to-syntax "'"))))
+      ;; Symbols with special characters.
+      
("\\(^\\|[^:]\\)\\(:\\(address@hidden|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)\\)"
+       (3 (string-to-syntax "_")))
+      ;; Part of method name when at the end of it.
       ("[!?]"
        (0 (unless (save-excursion
                     (or (nth 8 (syntax-ppss (match-beginning 0)))
-                        (eq (char-before) ?:)
                         (let (parse-sexp-lookup-properties)
                           (zerop (skip-syntax-backward "w_")))
                         (memq (preceding-char) '(?@ ?$))))
@@ -1887,15 +1897,18 @@ It will be properly highlighted even when the call 
omits parens.")
       ("^\\(=\\)begin\\_>" (1 "!"))
       ;; Handle here documents.
       ((concat ruby-here-doc-beg-re ".*\\(\n\\)")
-       (7 (unless (or (nth 8 (save-excursion
-                               (syntax-ppss (match-beginning 0))))
-                      (ruby-singleton-class-p (match-beginning 0)))
+       (7 (when (and (not (nth 8 (save-excursion
+                                   (syntax-ppss (match-beginning 0)))))
+                     (ruby-verify-heredoc (match-beginning 0)))
             (put-text-property (match-beginning 7) (match-end 7)
                                'syntax-table (string-to-syntax "\""))
             (ruby-syntax-propertize-heredoc end))))
       ;; Handle percent literals: %w(), %q{}, etc.
-      ((concat "\\(?:^\\|[[ \t\n<+(,=]\\)" ruby-percent-literal-beg-re)
-       (1 (prog1 "|" (ruby-syntax-propertize-percent-literal end)))))
+      ((concat "\\(?:^\\|[[ \t\n<+(,=*]\\)" ruby-percent-literal-beg-re)
+       (1 (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 1))))
+            ;; Not inside a string, a comment, or a percent literal.
+            (ruby-syntax-propertize-percent-literal end)
+            (string-to-syntax "|")))))
      (point) end)))
 
 (define-obsolete-function-alias
@@ -1910,7 +1923,7 @@ It will be properly highlighted even when the call omits 
parens.")
         (beginning-of-line)
         (while (re-search-forward ruby-here-doc-beg-re
                                   (line-end-position) t)
-          (unless (ruby-singleton-class-p (match-beginning 0))
+          (when (ruby-verify-heredoc (match-beginning 0))
             (push (concat (ruby-here-doc-end-match) "\n") res))))
       (save-excursion
         ;; With multiple openers on the same line, we don't know in which
@@ -1938,35 +1951,33 @@ It will be properly highlighted even when the call 
omits parens.")
 
 (defun ruby-syntax-propertize-percent-literal (limit)
   (goto-char (match-beginning 2))
-  ;; Not inside a simple string or comment.
-  (when (eq t (nth 3 (syntax-ppss)))
-    (let* ((op (char-after))
-           (ops (char-to-string op))
-           (cl (or (cdr (aref (syntax-table) op))
-                   (cdr (assoc op '((?< . ?>))))))
-           parse-sexp-lookup-properties)
-      (save-excursion
-        (condition-case nil
-            (progn
-              (if cl              ; Paired delimiters.
-                  ;; Delimiter pairs of the same kind can be nested
-                  ;; inside the literal, as long as they are balanced.
-                  ;; Create syntax table that ignores other characters.
-                  (with-syntax-table (make-char-table 'syntax-table nil)
-                    (modify-syntax-entry op (concat "(" (char-to-string cl)))
-                    (modify-syntax-entry cl (concat ")" ops))
-                    (modify-syntax-entry ?\\ "\\")
-                    (save-restriction
-                      (narrow-to-region (point) limit)
-                      (forward-list))) ; skip to the paired character
-                ;; Single character delimiter.
-                (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*"
-                                           (regexp-quote ops)) limit nil))
-              ;; Found the closing delimiter.
-              (put-text-property (1- (point)) (point) 'syntax-table
-                                 (string-to-syntax "|")))
-          ;; Unclosed literal, do nothing.
-          ((scan-error search-failed)))))))
+  (let* ((op (char-after))
+         (ops (char-to-string op))
+         (cl (or (cdr (aref (syntax-table) op))
+                 (cdr (assoc op '((?< . ?>))))))
+         parse-sexp-lookup-properties)
+    (save-excursion
+      (condition-case nil
+          (progn
+            (if cl              ; Paired delimiters.
+                ;; Delimiter pairs of the same kind can be nested
+                ;; inside the literal, as long as they are balanced.
+                ;; Create syntax table that ignores other characters.
+                (with-syntax-table (make-char-table 'syntax-table nil)
+                  (modify-syntax-entry op (concat "(" (char-to-string cl)))
+                  (modify-syntax-entry cl (concat ")" ops))
+                  (modify-syntax-entry ?\\ "\\")
+                  (save-restriction
+                    (narrow-to-region (point) limit)
+                    (forward-list))) ; skip to the paired character
+              ;; Single character delimiter.
+              (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*"
+                                         (regexp-quote ops)) limit nil))
+            ;; Found the closing delimiter.
+            (put-text-property (1- (point)) (point) 'syntax-table
+                               (string-to-syntax "|")))
+        ;; Unclosed literal, do nothing.
+        ((scan-error search-failed))))))
 
 (defun ruby-syntax-propertize-expansion ()
   ;; Save the match data to a text property, for font-locking later.
@@ -2158,7 +2169,7 @@ See `font-lock-syntax-table'.")
      (1 font-lock-builtin-face))
     ;; Here-doc beginnings.
     (,ruby-here-doc-beg-re
-     (0 (unless (ruby-singleton-class-p (match-beginning 0))
+     (0 (when (ruby-verify-heredoc (match-beginning 0))
           'font-lock-string-face)))
     ;; Perl-ish keywords.
     "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
@@ -2169,17 +2180,14 @@ See `font-lock-syntax-table'.")
     ;; Keywords that evaluate to certain values.
     ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
      (0 font-lock-builtin-face))
-    ;; Symbols with symbol characters.
+    ;; Symbols.
     ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?"
      (2 font-lock-constant-face)
      (3 (unless (and (eq (char-before (match-end 3)) ?=)
                      (eq (char-after (match-end 3)) ?>))
-          ;; bug#18466
+          ;; bug#18644
           font-lock-constant-face)
         nil t))
-    ;; Symbols with special characters.
-    
("\\(^\\|[^:]\\)\\(:\\(address@hidden|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
-     2 font-lock-constant-face)
     ;; Special globals.
     (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|"
               (regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME"
@@ -2219,7 +2227,7 @@ See `font-lock-syntax-table'.")
      1 font-lock-negation-char-face)
     ;; Character literals.
     ;; FIXME: Support longer escape sequences.
-    ("\\_<\\?\\\\?\\S " 0 font-lock-string-face)
+    ("\\?\\\\?\\_<.\\_>" 0 font-lock-string-face)
     ;; Regexp options.
     ("\\(?:\\s|\\|/\\)\\([imxo]+\\)"
      1 (when (save-excursion
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 1e6a69f..69e6a15 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -861,6 +861,7 @@ tools are used, and when."
   (let* ((ede-minor-mode nil)
          (default-directory dir)
          (semantic-symref-tool 'detect)
+         (case-fold-search nil)
          (res (semantic-symref-find-references-by-name symbol 'subdirs))
          (hits (and res (oref res hit-lines)))
          (orig-buffers (buffer-list)))
diff --git a/lisp/simple.el b/lisp/simple.el
index 8c9d546..e5fb5f0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3195,6 +3195,8 @@ shell (with its need to quote arguments)."
   "Execute string COMMAND in inferior shell; display output, if any.
 With prefix argument, insert the COMMAND's output at point.
 
+Interactively, prompt for COMMAND in the minibuffer.
+
 If COMMAND ends in `&', execute it asynchronously.
 The output appears in the buffer `*Async Shell Command*'.
 That buffer is in shell mode.  You can also use
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 19aefc2..5b1bd6a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -343,7 +343,7 @@ An alternative value is \" . \", if you use a font with a 
narrow period."
 (defun latex-imenu-create-index ()
   "Generate an alist for imenu from a LaTeX buffer."
   (let ((section-regexp
-        (concat "\\\\" (regexp-opt (mapcar 'car latex-section-alist) t)
+        (concat "\\\\" (regexp-opt (mapcar #'car latex-section-alist) t)
                 "\\*?[ \t]*{"))
        (metasection-regexp
         (concat "\\\\" (regexp-opt latex-metasection-list t)))
@@ -373,7 +373,7 @@ An alternative value is \" . \", if you use a font with a 
narrow period."
                ;; Using sexps allows some use of matching {...} inside
                ;; titles.
                (forward-sexp 1)
-               (push (cons (concat (apply 'concat
+               (push (cons (concat (apply #'concat
                                           (make-list
                                            (max 0 (- i i0))
                                            latex-imenu-indent-string))
@@ -413,7 +413,8 @@ An alternative value is \" . \", if you use a font with a 
narrow period."
 (defvar latex-outline-regexp
   (concat "\\\\"
          (regexp-opt (append latex-metasection-list
-                             (mapcar 'car latex-section-alist)) t)))
+                             (mapcar #'car latex-section-alist))
+                      t)))
 
 (defun latex-outline-level ()
   (if (looking-at latex-outline-regexp)
@@ -544,7 +545,8 @@ An alternative value is \" . \", if you use a font with a 
narrow period."
      (let* (;;
            ;; Names of commands whose arg should be fontified with fonts.
            (bold (regexp-opt '("textbf" "textsc" "textup"
-                               "boldsymbol" "pmb") t))
+                               "boldsymbol" "pmb")
+                              t))
            (italic (regexp-opt '("textit" "textsl" "emph") t))
            ;; FIXME: unimplemented yet.
            ;; (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t))
@@ -566,7 +568,8 @@ An alternative value is \" . \", if you use a font with a 
narrow period."
                         '("linebreak" "nolinebreak" "pagebreak" "nopagebreak"
                           "newline" "newpage" "clearpage" "cleardoublepage"
                           "displaybreak" "allowdisplaybreaks"
-                          "enlargethispage") t))
+                          "enlargethispage")
+                         t))
            (general "\\(address@hidden|[^ \t\n]\\)")
            ;;
            ;; Miscellany.
@@ -649,7 +652,7 @@ An alternative value is \" . \", if you use a font with a 
narrow period."
 (defvar tex-verbatim-environments
   '("verbatim" "verbatim*"))
 (put 'tex-verbatim-environments 'safe-local-variable
-     (lambda (x) (null (delq t (mapcar 'stringp x)))))
+     (lambda (x) (null (delq t (mapcar #'stringp x)))))
 
 (eval-when-compile
   (defconst tex-syntax-propertize-rules
@@ -1128,34 +1131,36 @@ subshell is initiated, `tex-shell-hook' is run."
        (concat "[ \t]*\\(\\$\\$\\|"
                "\\\\[][]\\|"
                "\\\\" (regexp-opt (append
-                                   (mapcar 'car latex-section-alist)
+                                   (mapcar #'car latex-section-alist)
                                    '("begin" "label" "end"
                                      "item" "bibitem" "newline" "noindent"
                                      "newpage" "footnote" "marginpar"
-                                     "parbox" "caption")) t)
+                                     "parbox" "caption"))
+                                   t)
                "\\>\\|\\\\[a-z]*" (regexp-opt '("space" "skip" "page") t)
                "\\>\\)"))
   (setq paragraph-separate
        (concat "[\f%]\\|[ \t]*\\($\\|"
                "\\\\[][]\\|"
                "\\\\" (regexp-opt (append
-                                   (mapcar 'car latex-section-alist)
-                                   '("begin" "label" "end" )) t)
+                                   (mapcar #'car latex-section-alist)
+                                   '("begin" "label" "end" ))
+                                   t)
                "\\>\\|\\\\\\(" (regexp-opt '("item" "bibitem" "newline"
                                              "noindent" "newpage" "footnote"
                                              "marginpar" "parbox" "caption"))
                "\\|\\$\\$\\|[a-z]*\\(space\\|skip\\|page[a-z]*\\)"
                "\\>\\)[ \t]*\\($\\|%\\)\\)"))
-  (setq-local imenu-create-index-function 'latex-imenu-create-index)
+  (setq-local imenu-create-index-function #'latex-imenu-create-index)
   (setq-local tex-face-alist tex-latex-face-alist)
-  (add-hook 'fill-nobreak-predicate 'latex-fill-nobreak-predicate nil t)
-  (setq-local indent-line-function 'latex-indent)
+  (add-hook 'fill-nobreak-predicate #'latex-fill-nobreak-predicate nil t)
+  (setq-local indent-line-function #'latex-indent)
   (setq-local fill-indent-according-to-mode t)
   (add-hook 'completion-at-point-functions
-            'latex-complete-data nil 'local)
+            #'latex-complete-data nil 'local)
   (setq-local outline-regexp latex-outline-regexp)
-  (setq-local outline-level 'latex-outline-level)
-  (setq-local forward-sexp-function 'latex-forward-sexp)
+  (setq-local outline-level #'latex-outline-level)
+  (setq-local forward-sexp-function #'latex-forward-sexp)
   (setq-local skeleton-end-hook nil))
 
 ;;;###autoload
@@ -1205,6 +1210,8 @@ Entering SliTeX mode runs the hook `text-mode-hook', then 
the hook
 
 (defvar tildify-space-string)
 (defvar tildify-foreach-region-function)
+(declare-function tildify-foreach-ignore-environments
+                  "tildify" (pairs callback _beg end))
 (defvar tex--prettify-symbols-alist)
 
 (defun tex-common-initialization ()
@@ -1216,7 +1223,7 @@ Entering SliTeX mode runs the hook `text-mode-hook', then 
the hook
   ;; rather than using regex-based filtering.
   (setq-local tildify-foreach-region-function
               (apply-partially
-               'tildify-foreach-ignore-environments
+               #'tildify-foreach-ignore-environments
                `(("\\\\\\\\" . "") ; do not remove this
                  (,(eval-when-compile
                      (concat "\\\\begin{\\("
@@ -1534,8 +1541,7 @@ a skeleton (see `skeleton-insert').")
 Puts point on a blank line between them."
   (let ((choice (completing-read (format "LaTeX block name [%s]: "
                                         latex-block-default)
-                                (append latex-block-names
-                                        latex-standard-block-names)
+                                 (latex-complete-envnames)
                                 nil nil nil nil latex-block-default)))
     (setq latex-block-default choice)
     (unless (or (member choice latex-standard-block-names)
@@ -1592,17 +1598,32 @@ Puts point on a blank line between them."
         (complete-with-action action keys key pred)))))
 
 (defun latex-complete-envnames ()
-  (append latex-block-names latex-standard-block-names))
+  (completion-table-in-turn
+   (append latex-block-names latex-standard-block-names)
+   (completion-table-dynamic
+    (lambda (str)
+      (with-current-buffer (if (and (minibufferp) (minibuffer-selected-window))
+                               (window-buffer (minibuffer-selected-window))
+                             (current-buffer))
+        (save-excursion
+          (let ((comps '())
+                (pos (point)))
+            (goto-char (point-min))
+            (while (re-search-forward (concat "\\\\begin{\\(" str "[^}\n 
]*\\)")
+                                      nil t)
+              (unless (and (<= (match-beginning 0) pos)
+                           (>= (match-end 0) pos))
+                (push (match-string 1) comps)))
+            comps)))))))
 
 (defun latex-complete-refkeys ()
   (when (boundp 'reftex-docstruct-symbol)
     (symbol-value reftex-docstruct-symbol)))
 
 (defvar latex-complete-alist
-  ;; TODO: Add \begin, \end, \ref, ...
-  '(("\\`\\\\\\(short\\)?cite\\'" . latex-complete-bibtex-keys)
-    ("\\`\\\\\\(begin\\|end\\)\\'" . latex-complete-envnames)
-    ("\\`\\\\[vf]?ref\\'" . latex-complete-refkeys)))
+  `(("\\`\\\\\\(short\\)?cite\\'" . ,#'latex-complete-bibtex-keys)
+    ("\\`\\\\\\(begin\\|end\\)\\'" . ,#'latex-complete-envnames)
+    ("\\`\\\\[vf]?ref\\'" . ,#'latex-complete-refkeys)))
 
 (defun latex-complete-data ()
   "Get completion-data at point."
@@ -2185,7 +2206,7 @@ of the current buffer."
 
 (defun tex-summarize-command (cmd)
   (if (not (stringp cmd)) ""
-    (mapconcat 'identity
+    (mapconcat #'identity
               (mapcar (lambda (s) (car (split-string s)))
                       (split-string cmd "\\s-*\\(?:;\\|&&\\)\\s-*"))
               "&")))
@@ -2367,7 +2388,8 @@ Only applies the FSPEC to the args part of FORMAT."
       ;; Substitute and return.
       (if (and hist-cmd
               (string-match (concat "[' \t\"]" (format-spec "%r" fspec)
-                                    "\\([;&' \t\"]\\|\\'\\)") hist-cmd))
+                                    "\\([;&' \t\"]\\|\\'\\)")
+                             hist-cmd))
          ;; The history command was already applied to the same file,
          ;; so just reuse it.
          hist-cmd
@@ -2752,7 +2774,7 @@ Runs the shell command defined by 
`tex-show-queue-command'."
 (defvar tex-indent-item-re "\\\\\\(bib\\)?item\\>")
 (defvar latex-noindent-environments '("document"))
 (put 'latex-noindent-environments 'safe-local-variable
-     (lambda (x) (null (delq t (mapcar 'stringp x)))))
+     (lambda (x) (null (delq t (mapcar #'stringp x)))))
 
 (defvar tex-latex-indent-syntax-table
   (let ((st (make-syntax-table tex-mode-syntax-table)))
diff --git a/lisp/wdired.el b/lisp/wdired.el
index d943dad..9109303 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -304,14 +304,15 @@ or \\[wdired-abort-changes] to abort changes")))
       (put-text-property b-protection (point-max) 'read-only t))))
 
 ;; This code is a copy of some dired-get-filename lines.
-(defsubst wdired-normalize-filename (file)
-  (setq file
-       ;; FIXME: shouldn't we check for a `b' argument or somesuch before
-       ;; doing such unquoting?  --Stef
-       (read (concat
-              "\"" (replace-regexp-in-string
-                    "\\([^\\]\\|\\`\\)\"" "\\1\\\\\"" file)
-              "\"")))
+(defsubst wdired-normalize-filename (file unquotep)
+  (when unquotep
+    (setq file
+          ;; FIXME: shouldn't we check for a `b' argument or somesuch before
+          ;; doing such unquoting?  --Stef
+          (read (concat
+                 "\"" (replace-regexp-in-string
+                       "\\([^\\]\\|\\`\\)\"" "\\1\\\\\"" file)
+                 "\""))))
   (and file buffer-file-coding-system
        (not file-name-coding-system)
        (not default-file-name-coding-system)
@@ -339,7 +340,8 @@ non-nil means return old filename."
          ;; deletion.
          (setq end (next-single-property-change beg 'end-name))
          (setq file (buffer-substring-no-properties (1+ beg) end)))
-       (and file (setq file (wdired-normalize-filename file))))
+       ;; Don't unquote the old name, it wasn't quoted in the first place
+        (and file (setq file (wdired-normalize-filename file (not old)))))
       (if (or no-dir old)
          file
        (and file (> (length file) 0)
@@ -644,7 +646,7 @@ If OLD, return the old target.  If MOVE, move point before 
it."
            (setq end (next-single-property-change beg 'end-link))
            (setq target (buffer-substring-no-properties (1+ beg) end)))
          (if move (goto-char (1- beg)))))
-    (and target (wdired-normalize-filename target))))
+    (and target (wdired-normalize-filename target t))))
 
 (declare-function make-symbolic-link "fileio.c")
 
diff --git a/lisp/window.el b/lisp/window.el
index 28632a3..1d41d82 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2473,8 +2473,6 @@ windows."
   (when (window-right window)
     (window--resize-reset-1 (window-right window) horizontal)))
 
-;; The following routine is used to manually resize the minibuffer
-;; window and is currently used, for example, by ispell.el.
 (defun window--resize-mini-window (window delta)
   "Resize minibuffer window WINDOW by DELTA pixels.
 If WINDOW cannot be resized by DELTA pixels make it as large (or
@@ -3338,34 +3336,42 @@ negative, shrink selected window by -DELTA lines or 
columns."
     (cond
      ((zerop delta))
      ((window-size-fixed-p nil horizontal)
-      (error "Selected window has fixed size"))
+      (user-error "Selected window has fixed size"))
      ((window-minibuffer-p)
       (if horizontal
-         (error "Cannot resize minibuffer window horizontally")
-       (window--resize-mini-window (selected-window) delta)))
+         (user-error "Cannot resize minibuffer window horizontally")
+       (window--resize-mini-window
+         (selected-window) (* delta (frame-char-height)))))
      ((and (not horizontal)
           (window-full-height-p)
           (eq (window-frame minibuffer-window) (selected-frame))
           (not resize-mini-windows))
       ;; If the selected window is full height and `resize-mini-windows'
       ;; is nil, resize the minibuffer window.
-      (window--resize-mini-window minibuffer-window (- delta)))
+      (window--resize-mini-window
+       minibuffer-window (* (- delta) (frame-char-height))))
      ((window--resizable-p nil delta horizontal)
       (window-resize nil delta horizontal))
      ((window--resizable-p nil delta horizontal 'preserved)
       (window-resize nil delta horizontal 'preserved))
-     ((eq this-command 'enlarge-window)
+     ((eq this-command
+         (if horizontal 'enlarge-window-horizontally 'enlarge-window))
+      ;; For backward compatibility don't signal an error unless this
+      ;; command is `enlarge-window(-horizontally)'.
       (user-error "Cannot enlarge selected window"))
      (t
-      (error "Cannot enlarge selected window")))))
+      (window-resize
+       nil (if (> delta 0)
+              (window-max-delta nil horizontal)
+            (- (window-min-delta nil horizontal)))
+       horizontal)))))
 
 (defun shrink-window (delta &optional horizontal)
   "Make the selected window DELTA lines smaller.
 Interactively, if no argument is given, make the selected window
 one line smaller.  If optional argument HORIZONTAL is non-nil,
 make selected window narrower by DELTA columns.  If DELTA is
-negative, enlarge selected window by -DELTA lines or columns.
-Also see the `window-min-height' variable."
+negative, enlarge selected window by -DELTA lines or columns."
   (interactive "p")
   (let ((minibuffer-window (minibuffer-window)))
     (when (window-preserved-size nil horizontal)
@@ -3373,26 +3379,35 @@ Also see the `window-min-height' variable."
     (cond
      ((zerop delta))
      ((window-size-fixed-p nil horizontal)
-      (error "Selected window has fixed size"))
+      (user-error "Selected window has fixed size"))
      ((window-minibuffer-p)
       (if horizontal
-         (error "Cannot resize minibuffer window horizontally")
-       (window--resize-mini-window (selected-window) (- delta))))
+         (user-error "Cannot resize minibuffer window horizontally")
+       (window--resize-mini-window
+         (selected-window) (* (- delta) (frame-char-height)))))
      ((and (not horizontal)
           (window-full-height-p)
           (eq (window-frame minibuffer-window) (selected-frame))
           (not resize-mini-windows))
       ;; If the selected window is full height and `resize-mini-windows'
       ;; is nil, resize the minibuffer window.
-      (window--resize-mini-window minibuffer-window delta))
+      (window--resize-mini-window
+       minibuffer-window (* delta (frame-char-height))))
      ((window--resizable-p nil (- delta) horizontal)
       (window-resize nil (- delta) horizontal))
      ((window--resizable-p nil (- delta) horizontal 'preserved)
       (window-resize nil (- delta) horizontal 'preserved))
-     ((eq this-command 'shrink-window)
+     ((eq this-command
+         (if horizontal 'shrink-window-horizontally 'shrink-window))
+      ;; For backward compatibility don't signal an error unless this
+      ;; command is `shrink-window(-horizontally)'.
       (user-error "Cannot shrink selected window"))
      (t
-      (error "Cannot shrink selected window")))))
+      (window-resize
+       nil (if (> delta 0)
+              (- (window-min-delta nil horizontal))
+            (window-max-delta nil horizontal))
+       horizontal)))))
 
 (defun maximize-window (&optional window)
   "Maximize WINDOW.
diff --git a/lisp/xml.el b/lisp/xml.el
index 2c3b6a4..1802d04 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -579,7 +579,14 @@ Return one of:
        (error "XML: (Well-Formed) Invalid character"))
       ;; However, if we're parsing incrementally, then we need to deal
       ;; with stray CDATA.
-      (xml-parse-string)))))
+      (let ((s (xml-parse-string)))
+        (when (string-empty-p s)
+          ;; We haven't consumed any input! We must throw an error in
+          ;; order to prevent looping forever.
+          (error "XML: (Not Well-Formed) Could not parse: %s"
+                 (buffer-substring-no-properties
+                  (point) (min (+ (point) 10) (point-max)))))
+        s)))))
 
 (defun xml-parse-string ()
   "Parse character data at point, and return it as a string.
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index fe282a5..1e578f3 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -54,6 +54,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
       ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
       : (199901L <= __STDC_VERSION__ \
          && !defined __HP_cc \
+         && !defined __PGI \
          && !(defined __SUNPRO_C && __STDC__))) \
      && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
 # define _GL_INLINE inline
diff --git a/modules/mod-test/mod-test.c b/modules/mod-test/mod-test.c
index bb9c8a5..3c8ab0f 100644
--- a/modules/mod-test/mod-test.c
+++ b/modules/mod-test/mod-test.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/msdos/inttypes.h b/msdos/inttypes.h
index da61b11..550ef36 100644
--- a/msdos/inttypes.h
+++ b/msdos/inttypes.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/addpm.c b/nt/addpm.c
index ed5014f..2161ea7 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index 4ca533b..411a409 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -16,8 +16,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/ddeclient.c b/nt/ddeclient.c
index f15c188..7bbbdb0 100644
--- a/nt/ddeclient.c
+++ b/nt/ddeclient.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -70,4 +70,3 @@ main (int argc, char *argv[])
 
   return (0);
 }
-
diff --git a/nt/inc/grp.h b/nt/inc/grp.h
index c441396..903fda9 100644
--- a/nt/inc/grp.h
+++ b/nt/inc/grp.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,4 +34,3 @@ extern unsigned getegid (void);
 extern struct group *getgrgid(gid_t);
 
 #endif /* _GRP_H */
-
diff --git a/nt/inc/inttypes.h b/nt/inc/inttypes.h
index 9abd55d..34d026c 100644
--- a/nt/inc/inttypes.h
+++ b/nt/inc/inttypes.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/inc/langinfo.h b/nt/inc/langinfo.h
index 646c8ca..1532eaa 100644
--- a/nt/inc/langinfo.h
+++ b/nt/inc/langinfo.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -58,4 +58,3 @@ enum {
 extern char *nl_langinfo (nl_item);
 
 #endif /* _LANGINFO_H */
-
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index 9de3b12..5fd54e2 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/inc/nl_types.h b/nt/inc/nl_types.h
index 6b22e76..e4d314c 100644
--- a/nt/inc/nl_types.h
+++ b/nt/inc/nl_types.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/inc/stdint.h b/nt/inc/stdint.h
index adc6a1e..bb067f4 100644
--- a/nt/inc/stdint.h
+++ b/nt/inc/stdint.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 2c72a78..6b9f56f 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -4,8 +4,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index f21086c..45bc2ea 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/inc/sys/wait.h b/nt/inc/sys/wait.h
index 8a77e98..46dae49 100644
--- a/nt/inc/sys/wait.h
+++ b/nt/inc/sys/wait.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/nt/preprep.c b/nt/preprep.c
index 303e2ef..491a93b 100644
--- a/nt/preprep.c
+++ b/nt/preprep.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,11 +34,10 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
 /* Include relevant definitions from IMAGEHLP.H, which can be found
    in \\win32sdk\mstools\samples\image\include\imagehlp.h. */
 
-PIMAGE_NT_HEADERS
-(__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress,
-                                    DWORD_PTR FileLength,
-                                    PDWORD_PTR HeaderSum,
-                                    PDWORD_PTR CheckSum);
+PIMAGE_NT_HEADERS (__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress,
+                                                      DWORD_PTR FileLength,
+                                                      PDWORD_PTR HeaderSum,
+                                                      PDWORD_PTR CheckSum);
 
 #undef min
 #undef max
diff --git a/nt/runemacs.c b/nt/runemacs.c
index 2685b25..b5e16c0 100644
--- a/nt/runemacs.c
+++ b/nt/runemacs.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c
index 1e2b198..0b812c5 100644
--- a/oldXMenu/Activate.c
+++ b/oldXMenu/Activate.c
@@ -7,8 +7,8 @@ Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c
index d0cf8f0..2fd86b2 100644
--- a/oldXMenu/Create.c
+++ b/oldXMenu/Create.c
@@ -7,8 +7,8 @@ Copyright (C) 1993-1994, 2001-2016 Free Software Foundation, 
Inc.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/oldXMenu/FindSel.c b/oldXMenu/FindSel.c
index 84c8651..991e1ca 100644
--- a/oldXMenu/FindSel.c
+++ b/oldXMenu/FindSel.c
@@ -7,8 +7,8 @@ Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/oldXMenu/Internal.c b/oldXMenu/Internal.c
index f25c963..45cdf4d 100644
--- a/oldXMenu/Internal.c
+++ b/oldXMenu/Internal.c
@@ -7,8 +7,8 @@ Copyright (C) 1993, 1996, 2001-2016 Free Software Foundation, 
Inc.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/oldXMenu/insque.c b/oldXMenu/insque.c
index 248eeafc..c044ff0 100644
--- a/oldXMenu/insque.c
+++ b/oldXMenu/insque.c
@@ -3,8 +3,8 @@ Copyright (C) 1993-1998, 2001-2016 Free Software Foundation, 
Inc.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/alloc.c b/src/alloc.c
index 5ee1cc3..eaa92ee 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/atimer.c b/src/atimer.c
index 8019560..70d9bf5 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/atimer.h b/src/atimer.h
index bebd156..17183c8 100644
--- a/src/atimer.h
+++ b/src/atimer.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/bidi.c b/src/bidi.c
index e778705..a68ffdb 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -2318,7 +2318,31 @@ bidi_resolve_weak (struct bidi_it *bidi_it)
              if (bidi_it->next_en_type == WEAK_EN) /* ET/BN with EN after it */
                type = WEAK_EN;
            }
-         else if (bidi_it->next_en_pos >=0)
+         else if (type == WEAK_BN
+                  /* This condition is for the following important case:
+
+                     . we are at level zero
+                     . either previous strong character was L,
+                        or we've seen no strong characters since sos
+                        and the base paragraph direction is L2R
+                     . this BN is NOT a bidi directional control
+
+                     For such a situation, either this BN will be
+                     converted to EN per W5, and then to L by virtue
+                     of W7; or it will become ON per W6, and then L
+                     because of N1/N2.  So we take a shortcut here
+                     and make it L right away, to avoid the
+                     potentially costly loop below.  This is
+                     important when the buffer has a long series of
+                     control characters, like binary nulls, and no
+                     R2L characters at all.  */
+                  && new_level == 0
+                  && !bidi_explicit_dir_char (bidi_it->ch)
+                  && ((bidi_it->last_strong.type == STRONG_L)
+                      || (bidi_it->last_strong.type == UNKNOWN_BT
+                          && bidi_it->sos == L2R)))
+           type = STRONG_L;
+         else if (bidi_it->next_en_pos >= 0)
            {
              /* We overstepped the last known position for ET
                 resolution but there could be other such characters
@@ -2981,9 +3005,10 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
         entering the expensive loop in the "else" clause.  */
       else if (current_level == 0
               && bidi_it->prev_for_neutral.type == STRONG_L
-              && type != WEAK_BN
-              && !bidi_explicit_dir_char (bidi_it->ch)
-              && !bidi_isolate_fmt_char (type))
+              && (ASCII_CHAR_P (bidi_it->ch)
+                  || (type != WEAK_BN
+                      && !bidi_explicit_dir_char (bidi_it->ch)
+                      && !bidi_isolate_fmt_char (type))))
        type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type,
                                       STRONG_L, current_level);
       else if (/* current level is 1 */
@@ -3163,7 +3188,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
        }
     }
 
-  /* Perhaps the character we want is already cached s fully resolved.
+  /* Perhaps the character we want is already cached as fully resolved.
      If it is, the call to bidi_cache_find below will return a type
      other than UNKNOWN_BT.  */
   if (bidi_cache_idx > bidi_cache_start && !bidi_it->first_elt)
@@ -3223,7 +3248,10 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
   if ((bidi_it->orig_type == NEUTRAL_WS
        || bidi_it->orig_type == WEAK_BN
        || bidi_isolate_fmt_char (bidi_it->orig_type))
-      && bidi_it->next_for_ws.charpos < bidi_it->charpos)
+      && bidi_it->next_for_ws.charpos < bidi_it->charpos
+      /* If this character is already at base level, we don't need to
+        reset it, so avoid the potentially costly loop below.  */
+      && level != bidi_it->level_stack[0].level)
     {
       int ch;
       ptrdiff_t clen = bidi_it->ch_len;
diff --git a/src/blockinput.h b/src/blockinput.h
index 5b8bf64..bf51375 100644
--- a/src/blockinput.h
+++ b/src/blockinput.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/buffer.c b/src/buffer.c
index 87945c2..9914c91 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1049,7 +1049,7 @@ DEFUN ("generate-new-buffer-name", 
Fgenerate_new_buffer_name,
        doc: /* Return a string that is the name of no existing buffer based on 
NAME.
 If there is no live buffer named NAME, then return NAME.
 Otherwise modify name by appending `<NUMBER>', incrementing NUMBER
-(starting at 2) until an unused name is found, and then return that name.
+\(starting at 2) until an unused name is found, and then return that name.
 Optional second argument IGNORE specifies a name that is okay to use (if
 it is in the sequence to be tried) even if a buffer with that name exists.
 
@@ -3798,10 +3798,10 @@ If omitted, BUFFER defaults to the current buffer.
 BEG and END may be integers or markers.
 The fourth arg FRONT-ADVANCE, if non-nil, makes the marker
 for the front of the overlay advance when text is inserted there
-(which means the text *is not* included in the overlay).
+\(which means the text *is not* included in the overlay).
 The fifth arg REAR-ADVANCE, if non-nil, makes the marker
 for the rear of the overlay advance when text is inserted there
-(which means the text *is* included in the overlay).  */)
+\(which means the text *is* included in the overlay).  */)
   (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer,
    Lisp_Object front_advance, Lisp_Object rear_advance)
 {
@@ -6035,7 +6035,7 @@ between 0.0 and 1.0, inclusive.  */);
               doc: /* List of functions to call before each text change.
 Two arguments are passed to each function: the positions of
 the beginning and end of the range of old text to be changed.
-(For an insertion, the beginning and end are at the same place.)
+\(For an insertion, the beginning and end are at the same place.)
 No information is given about the length of the text after the change.
 
 Buffer changes made while executing the `before-change-functions'
@@ -6052,7 +6052,7 @@ from happening repeatedly and making Emacs nonfunctional. 
 */);
 Three arguments are passed to each function: the positions of
 the beginning and end of the range of changed text,
 and the length in chars of the pre-change text replaced by that range.
-(For an insertion, the pre-change length is zero;
+\(For an insertion, the pre-change length is zero;
 for a deletion, that length is the number of chars deleted,
 and the post-change beginning and end are at the same place.)
 
@@ -6097,7 +6097,7 @@ was modified between BEG and END.  PROPERTY is the 
property name,
 and VALUE is the old value.
 
 An entry (apply FUN-NAME . ARGS) means undo the change with
-(apply FUN-NAME ARGS).
+\(apply FUN-NAME ARGS).
 
 An entry (apply DELTA BEG END FUN-NAME . ARGS) supports selective undo
 in the active region.  BEG and END is the range affected by this entry
@@ -6257,7 +6257,7 @@ to the default frame line height.  A value of nil means 
add no extra space.  */)
                     doc: /* Non-nil means show a cursor in non-selected 
windows.
 If nil, only shows a cursor in the selected window.
 If t, displays a cursor related to the usual cursor type
-(a solid box becomes hollow, a bar becomes a narrower bar).
+\(a solid box becomes hollow, a bar becomes a narrower bar).
 You can also specify the cursor type as in the `cursor-type' variable.
 Use Custom to set this variable and update the display.  */);
 
diff --git a/src/buffer.h b/src/buffer.h
index 16f1226..7bc77d1 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -352,9 +352,9 @@ extern void enlarge_buffer_text (struct buffer *, 
ptrdiff_t);
 /* Convert PTR, the address of a byte in the buffer, into a byte position.  */
 
 #define PTR_BYTE_POS(ptr) \
-((ptr) - (current_buffer)->text->beg                                       \
- - (ptr - (current_buffer)->text->beg <= GPT_BYTE - BEG_BYTE ? 0 : GAP_SIZE) \
- + BEG_BYTE)
+  ((ptr) - (current_buffer)->text->beg                                     \
+   - (ptr - (current_buffer)->text->beg <= GPT_BYTE - BEG_BYTE ? 0 : GAP_SIZE) 
\
+   + BEG_BYTE)
 
 /* Return character at byte position POS.  See the caveat WARNING for
    FETCH_MULTIBYTE_CHAR below.  */
@@ -386,24 +386,24 @@ extern void enlarge_buffer_text (struct buffer *, 
ptrdiff_t);
    Note that both arguments can be computed more than once.  */
 
 #define BUF_BYTE_ADDRESS(buf, pos) \
-((buf)->text->beg + (pos) - BEG_BYTE           \
- + ((pos) >= (buf)->text->gpt_byte ? (buf)->text->gap_size : 0))
+  ((buf)->text->beg + (pos) - BEG_BYTE \
+   + ((pos) >= (buf)->text->gpt_byte ? (buf)->text->gap_size : 0))
 
 /* Return the address of character at char position POS in buffer BUF.
    Note that both arguments can be computed more than once.  */
 
 #define BUF_CHAR_ADDRESS(buf, pos) \
-((buf)->text->beg + buf_charpos_to_bytepos ((buf), (pos)) - BEG_BYTE   \
- + ((pos) >= (buf)->text->gpt ? (buf)->text->gap_size : 0))
+  ((buf)->text->beg + buf_charpos_to_bytepos ((buf), (pos)) - BEG_BYTE \
+   + ((pos) >= (buf)->text->gpt ? (buf)->text->gap_size : 0))
 
 /* Convert PTR, the address of a char in buffer BUF,
    into a character position.  */
 
 #define BUF_PTR_BYTE_POS(buf, ptr)                             \
-((ptr) - (buf)->text->beg                                      \
- - (ptr - (buf)->text->beg <= BUF_GPT_BYTE (buf) - BEG_BYTE    \
-    ? 0 : BUF_GAP_SIZE ((buf)))                                        \
- + BEG_BYTE)
+  ((ptr) - (buf)->text->beg                                    \
+   - (ptr - (buf)->text->beg <= BUF_GPT_BYTE (buf) - BEG_BYTE  \
+      ? 0 : BUF_GAP_SIZE ((buf)))                              \
+   + BEG_BYTE)
 
 /* Return the character at byte position POS in buffer BUF.   */
 
diff --git a/src/bytecode.c b/src/bytecode.c
index 0befe65..9ae2e82 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1996,9 +1996,9 @@ syms_of_bytecode (void)
 
   DEFVAR_LISP ("byte-code-meter", Vbyte_code_meter,
               doc: /* A vector of vectors which holds a histogram of byte-code 
usage.
-(aref (aref byte-code-meter 0) CODE) indicates how many times the byte
+\(aref (aref byte-code-meter 0) CODE) indicates how many times the byte
 opcode CODE has been executed.
-(aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,
+\(aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,
 indicates how many times the byte opcodes CODE1 and CODE2 have been
 executed in succession.  */);
 
diff --git a/src/callint.c b/src/callint.c
index 3b23f22..3bcf2c8 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/callproc.c b/src/callproc.c
index 9ad7ef2..db602f5 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1457,7 +1457,7 @@ This function searches `process-environment' for VARIABLE.
 
 If optional parameter ENV is a list, then search this list instead of
 `process-environment', and return t when encountering a negative entry
-(an entry for a variable with no value).  */)
+\(an entry for a variable with no value).  */)
   (Lisp_Object variable, Lisp_Object env)
 {
   char *value;
@@ -1668,7 +1668,7 @@ Each element is a string (directory name) or nil (try 
default directory).
 
 By default the last element of this list is `exec-directory'. The
 last element is not always used, for example in shell completion
-(`shell-dynamic-complete-command').  */);
+\(`shell-dynamic-complete-command').  */);
 
   DEFVAR_LISP ("exec-suffixes", Vexec_suffixes,
               doc: /* List of suffixes to try to find executable file names.
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 348215e..c5bfa36 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/casetab.c b/src/casetab.c
index 8327fbd..2461647 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/category.c b/src/category.c
index 61502f8..4397f66 100644
--- a/src/category.c
+++ b/src/category.c
@@ -13,8 +13,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -462,7 +462,7 @@ Emacs treats a sequence of word constituent characters as a 
single
 word (i.e. finds no word boundary between them) only if they belong to
 the same script.  But, exceptions are allowed in the following cases.
 
-(1) The case that characters are in different scripts is controlled
+\(1) The case that characters are in different scripts is controlled
 by the variable `word-combining-categories'.
 
 Emacs finds no word boundary between characters of different scripts
@@ -476,7 +476,7 @@ For instance, to tell that Han characters followed by 
Hiragana
 characters can form a single word, the element `(?C . ?H)' should be
 in this list.
 
-(2) The case that character are in the same script is controlled by
+\(2) The case that character are in the same script is controlled by
 the variable `word-separating-categories'.
 
 Emacs finds a word boundary between characters of the same script
diff --git a/src/category.h b/src/category.h
index 02f9a19..247f909 100644
--- a/src/category.h
+++ b/src/category.h
@@ -11,8 +11,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/ccl.c b/src/ccl.c
index ef6cb98..b9dc52e 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -12,8 +12,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/ccl.h b/src/ccl.h
index fdce437..10860f5 100644
--- a/src/ccl.h
+++ b/src/ccl.h
@@ -11,8 +11,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/character.c b/src/character.c
index 4818748..9f60aa7 100644
--- a/src/character.c
+++ b/src/character.c
@@ -11,8 +11,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/character.h b/src/character.h
index 440e781..bc3e155 100644
--- a/src/character.h
+++ b/src/character.h
@@ -9,8 +9,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/charset.c b/src/charset.c
index f911e9e..264036a 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -15,8 +15,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/charset.h b/src/charset.h
index a5c4532..8e77567 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -13,8 +13,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/chartab.c b/src/chartab.c
index ec618f3..6cf8fea 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -533,7 +533,7 @@ DEFUN ("char-table-parent", Fchar_table_parent, 
Schar_table_parent,
 The value is either nil or another char-table.
 If CHAR-TABLE holds nil for a given character,
 then the actual applicable value is inherited from the parent char-table
-(or from its parents, if necessary).  */)
+\(or from its parents, if necessary).  */)
   (Lisp_Object char_table)
 {
   CHECK_CHAR_TABLE (char_table);
diff --git a/src/cm.c b/src/cm.c
index ec1545d..4f94c07 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/cm.h b/src/cm.h
index c109c47..126969d 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/cmds.c b/src/cmds.c
index 3450003..1e44ddd 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -106,7 +106,7 @@ right or to the left on the screen.  This is in contrast 
with
 DEFUN ("forward-line", Fforward_line, Sforward_line, 0, 1, "^p",
        doc: /* Move N lines forward (backward if N is negative).
 Precisely, if point is on line I, move to the start of line I + N
-("start of line" in the logical order).
+\("start of line" in the logical order).
 If there isn't room, go as far as possible (no error).
 
 Returns the count of lines left to move.  If moving forward,
diff --git a/src/coding.c b/src/coding.c
index f5fe52e..e72d7b7 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -12,8 +12,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -9790,7 +9790,7 @@ DEFUN ("find-operation-coding-system", 
Ffind_operation_coding_system,
        doc: /* Choose a coding system for an operation based on the target 
name.
 The value names a pair of coding systems: (DECODING-SYSTEM . ENCODING-SYSTEM).
 DECODING-SYSTEM is the coding system to use for decoding
-(in case OPERATION does decoding), and ENCODING-SYSTEM is the coding system
+\(in case OPERATION does decoding), and ENCODING-SYSTEM is the coding system
 for encoding (in case OPERATION does encoding).
 
 The first argument OPERATION specifies an I/O primitive:
@@ -11165,7 +11165,7 @@ the cdr part is used for encoding a text to be sent to 
a process.  */);
 Table of extra Latin codes in the range 128..159 (inclusive).
 This is a vector of length 256.
 If Nth element is non-nil, the existence of code N in a file
-(or output of subprocess) doesn't prevent it to be detected as
+\(or output of subprocess) doesn't prevent it to be detected as
 a coding system of ISO 2022 variant which has a flag
 `accept-latin-extra-code' t (e.g. iso-latin-1) on reading a file
 or reading output of a subprocess.
diff --git a/src/coding.h b/src/coding.h
index ea0cdd5..93ddff0 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -12,8 +12,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/commands.h b/src/commands.h
index 36ac00f..4e69cda 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/composite.c b/src/composite.c
index 43c909f..49b0003 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -11,8 +11,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/composite.h b/src/composite.h
index 1423feb..80e1740 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -11,8 +11,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/conf_post.h b/src/conf_post.h
index 11dbb6e..047e357 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/cygw32.c b/src/cygw32.c
index 422b04d..6822320 100644
--- a/src/cygw32.c
+++ b/src/cygw32.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/cygw32.h b/src/cygw32.h
index 58d8cd4..0f69881 100644
--- a/src/cygw32.h
+++ b/src/cygw32.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/data.c b/src/data.c
index 07f8724..2574cbb 100644
--- a/src/data.c
+++ b/src/data.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1673,7 +1673,7 @@ DEFUN ("make-local-variable", Fmake_local_variable, 
Smake_local_variable,
        1, 1, "vMake Local Variable: ",
        doc: /* Make VARIABLE have a separate value in the current buffer.
 Other buffers will continue to share a common default value.
-(The buffer-local value of VARIABLE starts out as the same value
+\(The buffer-local value of VARIABLE starts out as the same value
 VARIABLE previously had.  If VARIABLE was void, it remains void.)
 Return VARIABLE.
 
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 5148c32..d3a32c0 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/decompress.c b/src/decompress.c
index 8fb71b0..1213f48 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/dired.c b/src/dired.c
index fd5f142..ebc7029 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/dispextern.h b/src/dispextern.h
index 00667c5..7035872 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/dispnew.c b/src/dispnew.c
index a9f06eb..9cf12f1 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -5669,7 +5669,7 @@ DEFUN ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0,
 SECONDS may be a floating-point value, meaning that you can wait for a
 fraction of a second.  Optional second arg MILLISECONDS specifies an
 additional wait period, in milliseconds; this is for backwards compatibility.
-(Not all operating systems support waiting for a fraction of a second.)  */)
+\(Not all operating systems support waiting for a fraction of a second.)  */)
   (Lisp_Object seconds, Lisp_Object milliseconds)
 {
   double duration = extract_float (seconds);
diff --git a/src/disptab.h b/src/disptab.h
index 211b649..964162f 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/doc.c b/src/doc.c
index ae80791..c5dd8d5 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -138,6 +138,9 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool 
definition)
 #endif
       if (fd < 0)
        {
+         if (errno == EMFILE || errno == ENFILE)
+           report_file_error ("Read error on documentation file", file);
+
          SAFE_FREE ();
          AUTO_STRING (cannot_open, "Cannot open doc string file \"");
          AUTO_STRING (quote_nl, "\"\n");
@@ -716,7 +719,7 @@ is not on any keys.
 Each substring of the form \\=\\{MAPVAR} is replaced by a summary of
 the value of MAPVAR as a keymap.  This summary is similar to the one
 produced by `describe-bindings'.  The summary ends in two newlines
-(used by the helper function `help-make-xrefs' to find the end of the
+\(used by the helper function `help-make-xrefs' to find the end of the
 summary).
 
 Each substring of the form \\=\\<MAPVAR> specifies the use of MAPVAR
diff --git a/src/doprnt.c b/src/doprnt.c
index b0b92bf..506bbc3 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/dosfns.c b/src/dosfns.c
index f507f41..880fee9 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/dosfns.h b/src/dosfns.h
index fa45d71..9fbf7ed 100644
--- a/src/dosfns.h
+++ b/src/dosfns.h
@@ -9,8 +9,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -29,4 +29,3 @@ extern int         msdos_stdcolor_idx  (const char *);
 extern Lisp_Object msdos_stdcolor_name (int);
 extern void        x_set_title (struct frame *, Lisp_Object);
 #endif
-
diff --git a/src/dynlib.c b/src/dynlib.c
index c4647e6..64f688c 100644
--- a/src/dynlib.c
+++ b/src/dynlib.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/dynlib.h b/src/dynlib.h
index 33b6d60..a9da985 100644
--- a/src/dynlib.h
+++ b/src/dynlib.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/editfns.c b/src/editfns.c
index 2f46cfe..c6441c2 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1895,7 +1895,7 @@ DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0,
        doc: /* Return the current time, as a float number of seconds since the 
epoch.
 If SPECIFIED-TIME is given, it is the time to convert to float
 instead of the current time.  The argument should have the form
-(HIGH LOW) or (HIGH LOW USEC) or (HIGH LOW USEC PSEC).  Thus,
+\(HIGH LOW) or (HIGH LOW USEC) or (HIGH LOW USEC PSEC).  Thus,
 you can use times from `current-time' and from `file-attributes'.
 SPECIFIED-TIME can also have the form (HIGH . LOW), but this is
 considered obsolete.
@@ -2284,7 +2284,7 @@ OFFSET is an integer number of seconds ahead of UTC (east 
of Greenwich).
 NAME is a string giving the name of the time zone.
 If SPECIFIED-TIME is given, the time zone offset is determined from it
 instead of using the current time.  The argument should have the form
-(HIGH LOW . IGNORED).  Thus, you can use times obtained from
+\(HIGH LOW . IGNORED).  Thus, you can use times obtained from
 `current-time' and from `file-attributes'.  SPECIFIED-TIME can also
 have the form (HIGH . LOW), but this is considered obsolete.
 Optional second arg ZONE is omitted or nil for the local time zone, or
@@ -3627,7 +3627,7 @@ save_restriction_restore (Lisp_Object data)
 DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 
0,
        doc: /* Execute BODY, saving and restoring current buffer's 
restrictions.
 The buffer's restrictions make parts of the beginning and end invisible.
-(They are set up with `narrow-to-region' and eliminated with `widen'.)
+\(They are set up with `narrow-to-region' and eliminated with `widen'.)
 This special form, `save-restriction', saves the current buffer's restrictions
 when it is entered, and restores them when it is exited.
 So any `narrow-to-region' within BODY lasts only until the end of the form.
diff --git a/src/emacs-icon.h b/src/emacs-icon.h
index 2f0806c..970135f 100644
--- a/src/emacs-icon.h
+++ b/src/emacs-icon.h
@@ -9,8 +9,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -350,4 +350,3 @@ static unsigned char gnu_xbm_bits[] = {
    0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00};
-
diff --git a/src/emacs-module.c b/src/emacs-module.c
index a459ab8..3edb943 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/emacs-module.h b/src/emacs-module.h
index 13dcca0..ae7311b 100644
--- a/src/emacs-module.h
+++ b/src/emacs-module.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/emacs.c b/src/emacs.c
index cdc4ebb..95d1905 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 6795155..cebd7b6 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index 72652c5..3d6a76a 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/eval.c b/src/eval.c
index b6bf0e6..74b30e6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1191,7 +1191,7 @@ suppresses the debugger).
 When a handler handles an error, control returns to the `condition-case'
 and it executes the handler's BODY...
 with VAR bound to (ERROR-SYMBOL . SIGNAL-DATA) from the error.
-(If VAR is nil, the handler can't access that information.)
+\(If VAR is nil, the handler can't access that information.)
 Then the value of the last BODY form is returned from the `condition-case'
 expression.
 
@@ -2416,7 +2416,7 @@ may be nil, a function, or a list of functions.  Call each
 function in order with arguments ARGS, stopping at the first
 one that returns nil, and return nil.  Otherwise (if all functions
 return non-nil, or if there are no functions to call), return non-nil
-(do not rely on the precise return value in this case).
+\(do not rely on the precise return value in this case).
 
 Do not use `make-local-variable' to make a hook variable buffer-local.
 Instead, use `add-hook' and specify t for the LOCAL argument.
diff --git a/src/fileio.c b/src/fileio.c
index 0372f46..dfab3de 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -450,7 +450,7 @@ DEFUN ("unhandled-file-name-directory", 
Funhandled_file_name_directory,
 A `directly usable' directory name is one that may be used without the
 intervention of any file handler.
 If FILENAME is a directly usable file itself, return
-(file-name-as-directory FILENAME).
+\(file-name-as-directory FILENAME).
 If FILENAME refers to a file which is not accessible from a local process,
 then this should return nil.
 The `call-process' and `start-process' functions use this function to
@@ -741,7 +741,7 @@ DEFUN ("make-temp-name", Fmake_temp_name, Smake_temp_name, 
1, 1, 0,
        doc: /* Generate temporary file name (string) starting with PREFIX (a 
string).
 The Emacs process number forms part of the result, so there is no
 danger of generating a name being used by another Emacs process
-(so long as only a single host can access the containing directory...).
+\(so long as only a single host can access the containing directory...).
 
 This function tries to choose a name that has no existing file.
 For this to work, PREFIX should be an absolute file name.
@@ -757,7 +757,7 @@ normally use `make-temp-file' instead.  */)
 DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0,
        doc: /* Convert filename NAME to absolute, and canonicalize it.
 Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
-(does not start with slash or tilde); both the directory name and
+\(does not start with slash or tilde); both the directory name and
 a directory's file name are accepted.  If DEFAULT-DIRECTORY is nil or
 missing, the current buffer's value of `default-directory' is used.
 NAME should be a string that is a valid file name for the underlying
@@ -775,8 +775,8 @@ See also the function `substitute-in-file-name'.
 
 For technical reasons, this function can return correct but
 non-intuitive results for the root directory; for instance,
-(expand-file-name ".." "/") returns "/..".  For this reason, use
-(directory-file-name (file-name-directory dirname)) to traverse a
+\(expand-file-name ".." "/") returns "/..".  For this reason, use
+\(directory-file-name (file-name-directory dirname)) to traverse a
 filesystem tree, not (expand-file-name ".."  dirname).  */)
   (Lisp_Object name, Lisp_Object default_directory)
 {
@@ -1459,7 +1459,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  
*/)
 DEAFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0,
   "Convert FILENAME to absolute, and canonicalize it.\n\
 Second arg DEFAULT is directory to start with if FILENAME is relative\n\
-(does not start with slash); if DEFAULT is nil or missing,\n\
+\(does not start with slash); if DEFAULT is nil or missing,\n\
 the current buffer's value of default-directory is used.\n\
 Filenames containing `.' or `..' as components are simplified;\n\
 initial `~/' expands to your home directory.\n\
@@ -2468,7 +2468,7 @@ Use `file-symlink-p' to test for such links.  */)
 DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0,
        doc: /* Return t if FILENAME can be executed by you.
 For a directory, this means you can access files in that directory.
-(It is generally better to use `file-accessible-directory-p' for that
+\(It is generally better to use `file-accessible-directory-p' for that
 purpose, though.)  */)
   (Lisp_Object filename)
 {
@@ -5329,8 +5329,8 @@ DEFUN ("set-visited-file-modtime", 
Fset_visited_file_modtime,
 Useful if the buffer was not read from the file normally
 or if the file itself has been changed for some known benign reason.
 An argument specifies the modification time value to use
-(instead of that of the visited file), in the form of a list
-(HIGH LOW USEC PSEC) or an integer flag as returned by
+\(instead of that of the visited file), in the form of a list
+\(HIGH LOW USEC PSEC) or an integer flag as returned by
 `visited-file-modtime'.  */)
   (Lisp_Object time_flag)
 {
diff --git a/src/filelock.c b/src/filelock.c
index 57e3990..4c5d72d 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -10,8 +10,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/firstfile.c b/src/firstfile.c
index 68effeb..188d4f8 100644
--- a/src/firstfile.c
+++ b/src/firstfile.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/floatfns.c b/src/floatfns.c
index cf485b6..b9af03b 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -3,15 +3,15 @@
 Copyright (C) 1988, 1993-1994, 1999, 2001-2016 Free Software Foundation,
 Inc.
 
-Author: Wolfgang Rupprecht
-(according to ack.texi)
+Author: Wolfgang Rupprecht (ac
+ording to ack.texi)
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -170,7 +170,7 @@ Cause an error if X1 or X2 is not a float.  */)
 DEFUN ("frexp", Ffrexp, Sfrexp, 1, 1, 0,
        doc: /* Get significand and exponent of a floating point number.
 Breaks the floating point number X into its binary significand SGNFCAND
-(a floating point value between 0.5 (included) and 1.0 (excluded))
+\(a floating point value between 0.5 (included) and 1.0 (excluded))
 and an integral exponent EXP for 2, such that:
 
   X = SGNFCAND * 2^EXP
@@ -491,7 +491,7 @@ fmod_float (Lisp_Object x, Lisp_Object y)
 
 DEFUN ("fceiling", Ffceiling, Sfceiling, 1, 1, 0,
        doc: /* Return the smallest integer no less than ARG, as a float.
-(Round toward +inf.)  */)
+\(Round toward +inf.)  */)
   (Lisp_Object arg)
 {
   double d = extract_float (arg);
@@ -501,7 +501,7 @@ DEFUN ("fceiling", Ffceiling, Sfceiling, 1, 1, 0,
 
 DEFUN ("ffloor", Fffloor, Sffloor, 1, 1, 0,
        doc: /* Return the largest integer no greater than ARG, as a float.
-(Round towards -inf.)  */)
+\(Round towards -inf.)  */)
   (Lisp_Object arg)
 {
   double d = extract_float (arg);
diff --git a/src/fns.c b/src/fns.c
index d314fcd..0e3fc27 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -218,7 +218,7 @@ DEFUN ("compare-strings", Fcompare_strings, 
Scompare_strings, 6, 7, 0,
 The arguments START1, END1, START2, and END2, if non-nil, are
 positions specifying which parts of STR1 or STR2 to compare.  In
 string STR1, compare the part between START1 (inclusive) and END1
-(exclusive).  If START1 is nil, it defaults to 0, the beginning of
+\(exclusive).  If START1 is nil, it defaults to 0, the beginning of
 the string; if END1 is nil, it defaults to the length of the string.
 Likewise, in string STR2, compare the part between START2 and END2.
 Like in `substring', negative values are counted from the end.
@@ -385,7 +385,7 @@ This function obeys the conventions for collation order in 
your
 locale settings.  For example, punctuation and whitespace characters
 might be considered less significant for sorting:
 
-(sort \\='("11" "12" "1 1" "1 2" "1.1" "1.2") \\='string-collate-lessp)
+\(sort \\='("11" "12" "1 1" "1 2" "1.1" "1.2") \\='string-collate-lessp)
   => ("11" "1 1" "1.1" "12" "1 2" "1.2")
 
 The optional argument LOCALE, a string, overrides the setting of your
@@ -431,7 +431,7 @@ settings.  For example, characters with different coding 
points but
 the same meaning might be considered as equal, like different grave
 accent Unicode characters:
 
-(string-collate-equalp (string ?\\uFF40) (string ?\\u1FEF))
+\(string-collate-equalp (string ?\\uFF40) (string ?\\u1FEF))
   => t
 
 The optional argument LOCALE, a string, overrides the setting of your
@@ -1064,7 +1064,7 @@ to a multibyte character.  In this case, the returned 
string is a
 newly created string with no text properties.  If STRING is multibyte
 or entirely ASCII, it is returned unchanged.  In particular, when
 STRING is unibyte and entirely ASCII, the returned string is unibyte.
-(When the characters are all ASCII, Emacs primitives will treat the
+\(When the characters are all ASCII, Emacs primitives will treat the
 string the same way whether it is unibyte or multibyte.)  */)
   (Lisp_Object string)
 {
@@ -1263,14 +1263,14 @@ validate_subarray (Lisp_Object array, Lisp_Object from, 
Lisp_Object to,
 DEFUN ("substring", Fsubstring, Ssubstring, 1, 3, 0,
        doc: /* Return a new string whose contents are a substring of STRING.
 The returned string consists of the characters between index FROM
-(inclusive) and index TO (exclusive) of STRING.  FROM and TO are
+\(inclusive) and index TO (exclusive) of STRING.  FROM and TO are
 zero-indexed: 0 means the first character of STRING.  Negative values
 are counted from the end of STRING.  If TO is nil, the substring runs
 to the end of STRING.
 
 The STRING argument may also be a vector.  In that case, the return
 value is a new vector that contains the elements between index FROM
-(inclusive) and index TO (exclusive) of that vector argument.
+\(inclusive) and index TO (exclusive) of that vector argument.
 
 With one argument, just copy STRING (with properties, if any).  */)
   (Lisp_Object string, Lisp_Object from, Lisp_Object to)
@@ -2090,7 +2090,7 @@ merge (Lisp_Object org_l1, Lisp_Object org_l2, 
Lisp_Object pred)
 DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0,
        doc: /* Extract a value from a property list.
 PLIST is a property list, which is a list of the form
-(PROP1 VALUE1 PROP2 VALUE2...).  This function returns the value
+\(PROP1 VALUE1 PROP2 VALUE2...).  This function returns the value
 corresponding to the given PROP, or nil if PROP is not one of the
 properties on the list.  This function never signals an error.  */)
   (Lisp_Object plist, Lisp_Object prop)
@@ -2125,7 +2125,7 @@ This is the last value stored with `(put SYMBOL PROPNAME 
VALUE)'.  */)
 DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0,
        doc: /* Change value in PLIST of PROP to VAL.
 PLIST is a property list, which is a list of the form
-(PROP1 VALUE1 PROP2 VALUE2 ...).  PROP is a symbol and VAL is any object.
+\(PROP1 VALUE1 PROP2 VALUE2 ...).  PROP is a symbol and VAL is any object.
 If PROP is already a property on the list, its value is set to VAL,
 otherwise the new PROP VAL pair is added.  The new plist is returned;
 use `(setq x (plist-put x prop val))' to be sure to use the new value.
@@ -2169,7 +2169,7 @@ It can be retrieved with `(get SYMBOL PROPNAME)'.  */)
 DEFUN ("lax-plist-get", Flax_plist_get, Slax_plist_get, 2, 2, 0,
        doc: /* Extract a value from a property list, comparing with `equal'.
 PLIST is a property list, which is a list of the form
-(PROP1 VALUE1 PROP2 VALUE2...).  This function returns the value
+\(PROP1 VALUE1 PROP2 VALUE2...).  This function returns the value
 corresponding to the given PROP, or nil if PROP is not
 one of the properties on the list.  */)
   (Lisp_Object plist, Lisp_Object prop)
@@ -2194,7 +2194,7 @@ one of the properties on the list.  */)
 DEFUN ("lax-plist-put", Flax_plist_put, Slax_plist_put, 3, 3, 0,
        doc: /* Change value in PLIST of PROP to VAL, comparing with `equal'.
 PLIST is a property list, which is a list of the form
-(PROP1 VALUE1 PROP2 VALUE2 ...).  PROP and VAL are any objects.
+\(PROP1 VALUE1 PROP2 VALUE2 ...).  PROP and VAL are any objects.
 If PROP is already a property on the list, its value is set to VAL,
 otherwise the new PROP VAL pair is added.  The new plist is returned;
 use `(setq x (lax-plist-put x prop val))' to be sure to use the new value.
@@ -2907,7 +2907,7 @@ The normal messages at start and end of loading FILENAME 
are suppressed.  */)
 DEFUN ("plist-member", Fplist_member, Splist_member, 2, 2, 0,
        doc: /* Return non-nil if PLIST has the property PROP.
 PLIST is a property list, which is a list of the form
-(PROP1 VALUE1 PROP2 VALUE2 ...).  PROP is a symbol.
+\(PROP1 VALUE1 PROP2 VALUE2 ...).  PROP is a symbol.
 Unlike `plist-get', this allows you to distinguish between a missing
 property and a property with the value nil.
 The value is actually the tail of PLIST whose car is PROP.  */)
diff --git a/src/font.c b/src/font.c
index 039493b..5ab3b3e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -9,8 +9,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -4086,7 +4086,7 @@ DEFUN ("font-face-attributes", Ffont_face_attributes, 
Sfont_face_attributes, 1,
 FONT is a font name, a font-spec, a font-entity, or a font-object.
 The return value is a list of the form
 
-(:family FAMILY :height HEIGHT :weight WEIGHT :slant SLANT :width WIDTH)
+\(:family FAMILY :height HEIGHT :weight WEIGHT :slant SLANT :width WIDTH)
 
 where FAMILY, HEIGHT, WEIGHT, SLANT, and WIDTH are face attribute values
 compatible with `set-face-attribute'.  Some of these key-attribute pairs
@@ -5378,7 +5378,7 @@ where ENCODING is a charset or a char-table,
 and REPERTORY is a charset, a char-table, or nil.
 
 If ENCODING and REPERTORY are the same, the element can have the form
-(REGEXP . ENCODING).
+\(REGEXP . ENCODING).
 
 ENCODING is for converting a character to a glyph code of the font.
 If ENCODING is a charset, encoding a character by the charset gives
diff --git a/src/font.h b/src/font.h
index 36fe51a..cf47729 100644
--- a/src/font.h
+++ b/src/font.h
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/fontset.c b/src/fontset.c
index 0485f6b..4ab1367 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -13,8 +13,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/fontset.h b/src/fontset.h
index 048a7d4..91d690a 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -12,8 +12,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/frame.c b/src/frame.c
index d536468..a0aff88 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -5226,7 +5226,7 @@ keep it unchanged if this option is either t or a list 
containing
 `vertical-scroll-bars'.
 
 The default value is \\='(tool-bar-lines) on Lucid, Motif and Windows
-(which means that adding/removing a tool bar does not change the frame
+\(which means that adding/removing a tool bar does not change the frame
 height), nil on all other window systems including GTK+ (which means
 that changing any of the parameters listed above may change the size of
 the frame), and t otherwise (which means the frame size never changes
diff --git a/src/frame.h b/src/frame.h
index b83820a..9de672c 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/fringe.c b/src/fringe.c
index 597c666..061f786 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1701,7 +1701,7 @@ syms_of_fringe (void)
   DEFVAR_LISP ("overflow-newline-into-fringe", Voverflow_newline_into_fringe,
     doc: /* Non-nil means that newline may flow into the right fringe.
 This means that display lines which are exactly as wide as the window
-(not counting the final newline) will only occupy one screen line, by
+\(not counting the final newline) will only occupy one screen line, by
 showing (or hiding) the final newline in the right fringe; when point
 is at the final newline, the cursor is shown in the right fringe.
 If nil, also continue lines which are exactly as wide as the window.  */);
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index f7b1e7d..2676502 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/ftfont.c b/src/ftfont.c
index 505d508..a402245 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/ftfont.h b/src/ftfont.h
index 0cfa0ae..90abb45 100644
--- a/src/ftfont.h
+++ b/src/ftfont.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -44,4 +44,3 @@ extern Lisp_Object ftfont_open2 (struct frame *f,
 extern size_t ftfont_info_size;
 
 #endif /* EMACS_FTFONT_H */
-
diff --git a/src/ftxfont.c b/src/ftxfont.c
index adf0d29..f49d44f 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/getpagesize.h b/src/getpagesize.h
index e464153..fe83ae8 100644
--- a/src/getpagesize.h
+++ b/src/getpagesize.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -46,4 +46,3 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 # endif /* no _SC_PAGESIZE */
 
 #endif /* no HAVE_GETPAGESIZE */
-
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 62b4efb..3b1f2fc 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/gnutls.c b/src/gnutls.c
index a9a912e..63785fe 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/gnutls.h b/src/gnutls.h
index 7418f8f..47e11f2 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 14b76ce..7dca585 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/gtkutil.h b/src/gtkutil.h
index ff22e3c..8840fe7 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/image.c b/src/image.c
index aa45b00..bee066e 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/indent.c b/src/indent.c
index ee2e9c6..d5162e3 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/indent.h b/src/indent.h
index 804c47d..f2a4c90 100644
--- a/src/indent.h
+++ b/src/indent.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/inotify.c b/src/inotify.c
index e0619e5..38c8df5 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -272,7 +272,7 @@ onlydir
 Watching a directory is not recursive.  CALLBACK is passed a single argument
 EVENT which contains an event structure of the format
 
-(WATCH-DESCRIPTOR ASPECTS NAME COOKIE)
+\(WATCH-DESCRIPTOR ASPECTS NAME COOKIE)
 
 WATCH-DESCRIPTOR is the same object that was returned by this function.  It can
 be tested for equality using `equal'.  ASPECTS describes the event.  It is a
diff --git a/src/insdel.c b/src/insdel.c
index d5ead0e..9ebf571 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/intervals.c b/src/intervals.c
index 29cc403..8451069 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/intervals.h b/src/intervals.h
index 2b68d4e..b8cdcfd 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/keyboard.c b/src/keyboard.c
index 4e1ac15..b8e0a6d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -11383,7 +11383,7 @@ See Info node `(elisp)Multiple Terminals'.  */);
 
   DEFVAR_BOOL ("cannot-suspend", cannot_suspend,
               doc: /* Non-nil means to always spawn a subshell instead of 
suspending.
-(Even if the operating system has support for stopping a process.)  */);
+\(Even if the operating system has support for stopping a process.)  */);
   cannot_suspend = false;
 
   DEFVAR_BOOL ("menu-prompting", menu_prompting,
@@ -11597,7 +11597,7 @@ immediately after running `post-command-hook'.  */);
   DEFVAR_LISP ("input-method-function", Vinput_method_function,
               doc: /* If non-nil, the function that implements the current 
input method.
 It's called with one argument, a printing character that was just read.
-(That means a character with code 040...0176.)
+\(That means a character with code 040...0176.)
 Typically this function uses `read-event' to read additional events.
 When it does so, it should first bind `input-method-function' to nil
 so it will not be called recursively.
diff --git a/src/keyboard.h b/src/keyboard.h
index 7f95f11..3873787 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/keymap.c b/src/keymap.c
index 7928e62..8ab4c6c 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1687,7 +1687,7 @@ DEFUN ("global-key-binding", Fglobal_key_binding, 
Sglobal_key_binding, 1, 2, 0,
 KEYS is a string or vector, a sequence of keystrokes.
 The binding is probably a symbol with a function definition.
 This function's return values are the same as those of `lookup-key'
-(which see).
+\(which see).
 
 If optional argument ACCEPT-DEFAULT is non-nil, recognize default
 bindings; see the description of `lookup-key' for more details about this.  */)
@@ -2493,7 +2493,7 @@ If FIRSTONLY is the symbol `non-ascii', return the first 
binding found,
 no matter what it is.
 If FIRSTONLY has another non-nil value, prefer bindings
 that use the modifier key specified in `where-is-preferred-modifier'
-(or their meta variants) and entirely reject menu bindings.
+\(or their meta variants) and entirely reject menu bindings.
 
 If optional 4th arg NOINDIRECT is non-nil, don't extract the commands inside
 menu-items.  This makes it possible to search for a menu-item itself.
@@ -2724,7 +2724,7 @@ looked up in BUFFER.
 The optional argument PREFIX, if non-nil, should be a key sequence;
 then we display only bindings that start with that prefix.
 The optional argument MENUS, if non-nil, says to mention menu bindings.
-(Ordinarily these are omitted from the output.)  */)
+\(Ordinarily these are omitted from the output.)  */)
   (Lisp_Object buffer, Lisp_Object prefix, Lisp_Object menus)
 {
   Lisp_Object outbuf, shadow;
diff --git a/src/keymap.h b/src/keymap.h
index 009aa01..37f866c 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/kqueue.c b/src/kqueue.c
index 7e3bfdd..f45bd0c 100644
--- a/src/kqueue.c
+++ b/src/kqueue.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -71,9 +71,8 @@ kqueue_directory_listing (Lisp_Object directory_files)
 
 /* Generate a file notification event.  */
 static void
-kqueue_generate_event
-(Lisp_Object watch_object, Lisp_Object actions,
- Lisp_Object file, Lisp_Object file1)
+kqueue_generate_event (Lisp_Object watch_object, Lisp_Object actions,
+                      Lisp_Object file, Lisp_Object file1)
 {
   Lisp_Object flags, action, entry;
   struct input_event event;
@@ -113,8 +112,7 @@ kqueue_generate_event
    replaced by the new directory listing at the end of this
    function.  */
 static void
-kqueue_compare_dir_list
-(Lisp_Object watch_object)
+kqueue_compare_dir_list (Lisp_Object watch_object)
 {
   Lisp_Object dir, pending_dl, deleted_dl;
   Lisp_Object old_directory_files, old_dl, new_directory_files, new_dl, dl;
diff --git a/src/lastfile.c b/src/lastfile.c
index de4e4f4..9d70b00 100644
--- a/src/lastfile.c
+++ b/src/lastfile.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/lisp.h b/src/lisp.h
index 9c7955e..d0abb24 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/lread.c b/src/lread.c
index 25e3ff0..9146923 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -264,7 +264,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
       return c;
     }
 
-  if (CONSP (readcharfun))
+  if (CONSP (readcharfun) && STRINGP (XCAR (readcharfun)))
     {
       /* This is the case that read_vector is reading from a unibyte
         string that contains a byte sequence previously skipped
@@ -406,7 +406,7 @@ unreadchar (Lisp_Object readcharfun, int c)
       read_from_string_index_byte
        = string_char_to_byte (readcharfun, read_from_string_index);
     }
-  else if (CONSP (readcharfun))
+  else if (CONSP (readcharfun) && STRINGP (XCAR (readcharfun)))
     {
       unread_char = c;
     }
@@ -2059,7 +2059,7 @@ Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX).
 FINAL-STRING-INDEX is an integer giving the position of the next
 remaining character in STRING.  START and END optionally delimit
 a substring of STRING from which to read;  they default to 0 and
-(length STRING) respectively.  Negative values are counted from
+\(length STRING) respectively.  Negative values are counted from
 the end of STRING.  */)
   (Lisp_Object string, Lisp_Object start, Lisp_Object end)
 {
diff --git a/src/macfont.h b/src/macfont.h
index 587f10a..6630fb5 100644
--- a/src/macfont.h
+++ b/src/macfont.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -82,4 +82,3 @@ typedef const struct _EmacsScreenFont *ScreenFontRef; /* 
opaque */
 extern void mac_register_font_driver (struct frame *f);
 extern void *macfont_get_nsctfont (struct font *font);
 extern void macfont_update_antialias_threshold (void);
-
diff --git a/src/macfont.m b/src/macfont.m
index 45830e0..c9082a5 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/macros.c b/src/macros.c
index 289f22b..0c703ba 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/macros.h b/src/macros.h
index 3a0c57e..6c66c4a 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/marker.c b/src/marker.c
index 9f53e9a..0300830 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/menu.c b/src/menu.c
index cbddef3..9504cee 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1130,7 +1130,7 @@ If POSITION is t, it means to use the current mouse 
position.
 MENU is a specifier for a menu.  For the simplest case, MENU is a keymap.
 The menu items come from key bindings that have a menu string as well as
 a definition; actually, the "definition" in such a key binding looks like
-(STRING . REAL-DEFINITION).  To give the menu a title, put a string into
+\(STRING . REAL-DEFINITION).  To give the menu a title, put a string into
 the keymap as a top-level element.
 
 If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.
@@ -1495,7 +1495,7 @@ The return value is VALUE from the chosen item.
 An ITEM may also be just a string--that makes a nonselectable item.
 An ITEM may also be nil--that means to put all preceding items
 on the left of the dialog box and all following items on the right.
-(By default, approximately half appear on each side.)
+\(By default, approximately half appear on each side.)
 
 If HEADER is non-nil, the frame title for the box is "Information",
 otherwise it is "Question".
diff --git a/src/menu.h b/src/menu.h
index 95d2fe5..4c50efb 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/minibuf.c b/src/minibuf.c
index 180668f..238a04a 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -986,7 +986,7 @@ DEFUN ("read-no-blanks-input", Fread_no_blanks_input, 
Sread_no_blanks_input, 1,
 Prompt with PROMPT.  Whitespace terminates the input.  If INITIAL is
 non-nil, it should be a string, which is used as initial input, with
 point positioned at the end, so that SPACE will accept the input.
-(Actually, INITIAL can also be a cons of a string and an integer.
+\(Actually, INITIAL can also be a cons of a string and an integer.
 Such values are treated as in `read-from-minibuffer', but are normally
 not useful in this function.)
 Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
diff --git a/src/msdos.c b/src/msdos.c
index b378cc2..84e8c39 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/msdos.h b/src/msdos.h
index 691822f..863ca48 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -129,4 +129,3 @@ void XMenuDestroy (Display *, XMenu *);
 #endif /* not HAVE_X_WINDOWS */
 
 #endif /* not EMACS_MSDOS_H */
-
diff --git a/src/nsfns.m b/src/nsfns.m
index eda94c4..ea09908 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1684,7 +1684,7 @@ DEFUN ("x-server-max-request-size", 
Fx_server_max_request_size,
 
 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
        doc: /* Return the "vendor ID" string of Nextstep display server 
TERMINAL.
-(Labeling every distributor as a "vendor" embodies the false assumption
+\(Labeling every distributor as a "vendor" embodies the false assumption
 that operating systems cannot be developed and distributed noncommercially.)
 The optional argument TERMINAL specifies which display to ask about.
 TERMINAL should be a terminal object, a frame or a display name (a string).
@@ -1730,7 +1730,7 @@ If omitted or nil, that stands for the selected frame's 
display.
 
 Note: "screen" here is not in Nextstep terminology but in X11's.  For
 the number of physical monitors, use `(length
-(display-monitor-attributes-list TERMINAL))' instead.  */)
+\(display-monitor-attributes-list TERMINAL))' instead.  */)
   (Lisp_Object terminal)
 {
   check_ns_display_info (terminal);
@@ -1861,7 +1861,7 @@ DISPLAY is the name of the display to connect to.
 Optional second arg XRM-STRING is a string of resources in xrdb format.
 If the optional third arg MUST-SUCCEED is non-nil,
 terminate Emacs if we can't open the connection.
-(In the Nextstep version, the last two arguments are currently ignored.)  */)
+\(In the Nextstep version, the last two arguments are currently ignored.)  */)
      (Lisp_Object display, Lisp_Object resource_string, Lisp_Object 
must_succeed)
 {
   struct ns_display_info *dpyinfo;
@@ -2301,7 +2301,7 @@ x_get_focus_frame (struct frame *frame)
 
 DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
        doc: /* Internal function called by `color-defined-p', which see.
-(Note that the Nextstep version of this function ignores FRAME.)  */)
+\(Note that the Nextstep version of this function ignores FRAME.)  */)
      (Lisp_Object color, Lisp_Object frame)
 {
   NSColor * col;
diff --git a/src/nsfont.m b/src/nsfont.m
index b46680b..92e7d11 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/nsgui.h b/src/nsgui.h
index cc2e45e..8dac1bd 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/nsimage.m b/src/nsimage.m
index b871448..5b2534b 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/nsmenu.m b/src/nsmenu.m
index c6d6835..7d340e8 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/nsselect.m b/src/nsselect.m
index 463f02b..eba2393 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -316,7 +316,7 @@ DEFUN ("ns-own-selection-internal", 
Fns_own_selection_internal,
        Sns_own_selection_internal, 2, 2, 0,
        doc: /* Assert an X selection of type SELECTION and value VALUE.
 SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-(Those are literal upper-case symbol names, since that's what X expects.)
+\(Those are literal upper-case symbol names, since that's what X expects.)
 VALUE is typically a string, or a cons of two markers, but may be
 anything that the functions on `selection-converter-alist' know about.  */)
      (Lisp_Object selection, Lisp_Object value)
@@ -414,7 +414,7 @@ DEFUN ("ns-selection-owner-p", Fns_selection_owner_p, 
Sns_selection_owner_p,
        doc: /* Whether the current Emacs process owns the given X Selection.
 The arg should be the name of the selection in question, typically one of
 the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-(Those are literal upper-case symbol names, since that's what X expects.)
+\(Those are literal upper-case symbol names, since that's what X expects.)
 For convenience, the symbol nil is the same as `PRIMARY',
 and t is the same as `SECONDARY'.  */)
      (Lisp_Object selection)
@@ -433,7 +433,7 @@ DEFUN ("ns-get-selection", Fns_get_selection,
        Sns_get_selection, 2, 2, 0,
        doc: /* Return text selected from some X window.
 SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-(Those are literal upper-case symbol names, since that's what X expects.)
+\(Those are literal upper-case symbol names, since that's what X expects.)
 TARGET-TYPE is the type of data desired, typically `STRING'.  */)
      (Lisp_Object selection_name, Lisp_Object target_type)
 {
diff --git a/src/nsterm.h b/src/nsterm.h
index fa5399c..0aea9cc 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1044,10 +1044,10 @@ struct x_output
 
 /* Difference btwn char-column-calculated and actual SB widths.
    This is only a concern for rendering when SB on left. */
-#define NS_SCROLL_BAR_ADJUST(w, f)             \
-(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) ?  \
-    (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)        \
-        - NS_SCROLL_BAR_WIDTH (f)) : 0)
+#define NS_SCROLL_BAR_ADJUST(w, f)                             \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) ?                        \
+   (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)         \
+    - NS_SCROLL_BAR_WIDTH (f)) : 0)
 
 /* Difference btwn char-line-calculated and actual SB heights.
    This is only a concern for rendering when SB on top. */
diff --git a/src/nsterm.m b/src/nsterm.m
index 185753d..38aa4a3 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/print.c b/src/print.c
index 2ecc0f5..2b53d75 100644
--- a/src/print.c
+++ b/src/print.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -2224,7 +2224,7 @@ Also print formfeeds as `\\f'.  */);
 
   DEFVAR_BOOL ("print-escape-nonascii", print_escape_nonascii,
               doc: /* Non-nil means print unibyte non-ASCII chars in strings 
as \\OOO.
-(OOO is the octal representation of the character code.)
+\(OOO is the octal representation of the character code.)
 Only single-byte characters are affected, and only in `prin1'.
 When the output goes in a multibyte buffer, this feature is
 enabled regardless of the value of the variable.  */);
@@ -2232,7 +2232,7 @@ enabled regardless of the value of the variable.  */);
 
   DEFVAR_BOOL ("print-escape-multibyte", print_escape_multibyte,
               doc: /* Non-nil means print multibyte characters in strings as 
\\xXXXX.
-(XXXX is the hex representation of the character code.)
+\(XXXX is the hex representation of the character code.)
 This affects only `prin1'.  */);
   print_escape_multibyte = 0;
 
diff --git a/src/process.c b/src/process.c
index 56f036c..a518c2b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -982,7 +982,7 @@ DEFUN ("process-command", Fprocess_command, 
Sprocess_command, 1, 1, 0,
 This is a list of strings, the first string being the program executed
 and the rest of the strings being the arguments given to it.
 For a network or serial process, this is nil (process is running) or t
-(process is stopped).  */)
+\(process is stopped).  */)
   (register Lisp_Object process)
 {
   CHECK_PROCESS (process);
@@ -2726,7 +2726,7 @@ is not given or nil, 1 stopbit is used.
 :flowcontrol FLOWCONTROL -- FLOWCONTROL determines the type of
 flowcontrol to be used, which is either nil (don't use flowcontrol),
 the symbol `hw' (use RTS/CTS hardware flowcontrol), or the symbol `sw'
-(use XON/XOFF software flowcontrol).  If FLOWCONTROL is not given, no
+\(use XON/XOFF software flowcontrol).  If FLOWCONTROL is not given, no
 flowcontrol is used.
 
 `serial-process-configure' is called by `make-serial-process' for the
@@ -2734,12 +2734,12 @@ initial configuration of the serial port.
 
 Examples:
 
-(serial-process-configure :process "/dev/ttyS0" :speed 1200)
+\(serial-process-configure :process "/dev/ttyS0" :speed 1200)
 
-(serial-process-configure
+\(serial-process-configure
     :buffer "COM1" :stopbits 1 :parity \\='odd :flowcontrol \\='hw)
 
-(serial-process-configure :port "\\\\.\\COM13" :bytesize 7)
+\(serial-process-configure :port "\\\\.\\COM13" :bytesize 7)
 
 usage: (serial-process-configure &rest ARGS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
@@ -2833,13 +2833,13 @@ is available via the function `process-contact'.
 
 Examples:
 
-(make-serial-process :port "/dev/ttyS0" :speed 9600)
+\(make-serial-process :port "/dev/ttyS0" :speed 9600)
 
-(make-serial-process :port "COM1" :speed 115200 :stopbits 2)
+\(make-serial-process :port "COM1" :speed 115200 :stopbits 2)
 
-(make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity 
\\='odd)
+\(make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity 
\\='odd)
 
-(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil)
+\(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil)
 
 usage:  (make-serial-process &rest ARGS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
diff --git a/src/process.h b/src/process.h
index 95bd1b6..20593f5 100644
--- a/src/process.h
+++ b/src/process.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/profiler.c b/src/profiler.c
index 95f84fd..31bd77f 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/puresize.h b/src/puresize.h
index bcb5a9c..fb9d934 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/ralloc.c b/src/ralloc.c
index d1a9e01..071cee7 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/region-cache.c b/src/region-cache.c
index 4ce7de8..4584956 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/region-cache.h b/src/region-cache.h
index 0c8861f..270531e 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/scroll.c b/src/scroll.c
index 517cc68..b886108 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/search.c b/src/search.c
index 68b0121..f39df67 100644
--- a/src/search.c
+++ b/src/search.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/sheap.c b/src/sheap.c
index fe905ca..72b74fa 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/sound.c b/src/sound.c
index 42f1fca..b9a794b 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/syntax.c b/src/syntax.c
index e43ae55..e173bbe 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/syntax.h b/src/syntax.h
index cc27727..7ee7c84 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/sysdep.c b/src/sysdep.c
index a01bf1d..6154c13 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/sysselect.h b/src/sysselect.h
index b625a65..0bf9b40 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/syssignal.h b/src/syssignal.h
index df4b140..3de83c7 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/sysstdio.h b/src/sysstdio.h
index e1416b6..f1f923e 100644
--- a/src/sysstdio.h
+++ b/src/sysstdio.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/systime.h b/src/systime.h
index 04c83ff..355a3c2 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/systty.h b/src/systty.h
index 116af97..fbdc6b1 100644
--- a/src/systty.h
+++ b/src/systty.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/syswait.h b/src/syswait.h
index ca672d1..800d572 100644
--- a/src/syswait.h
+++ b/src/syswait.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/term.c b/src/term.c
index 993928e..17f3679 100644
--- a/src/term.c
+++ b/src/term.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/termchar.h b/src/termchar.h
index d816da2..35b30fb 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/termhooks.h b/src/termhooks.h
index c183528..d21d6ce 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/terminal.c b/src/terminal.c
index a557967..5dd9975 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/terminfo.c b/src/terminfo.c
index b8b5f97..04da30b 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/termopts.h b/src/termopts.h
index 7cffa16..c64bd1b 100644
--- a/src/termopts.h
+++ b/src/termopts.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/textprop.c b/src/textprop.c
index 25fb6dc..43e15db 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1515,7 +1515,7 @@ DEFUN ("remove-text-properties", Fremove_text_properties,
        doc: /* Remove some properties from text from START to END.
 The third argument PROPERTIES is a property list
 whose property names specify the properties to remove.
-(The values stored in PROPERTIES are ignored.)
+\(The values stored in PROPERTIES are ignored.)
 If the optional fourth argument OBJECT is a buffer (or nil, which means
 the current buffer), START and END are buffer positions (integers or
 markers).  If OBJECT is a string, START and END are 0-based indices into it.
diff --git a/src/tparam.h b/src/tparam.h
index ab82e5b..cc53bb9 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/undo.c b/src/undo.c
index 1cc9c98..be5b270 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/unexaix.c b/src/unexaix.c
index eb51d28..c2012f7 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/unexcoff.c b/src/unexcoff.c
index cc0df30..6a08380 100644
--- a/src/unexcoff.c
+++ b/src/unexcoff.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/unexcw.c b/src/unexcw.c
index 6ebd8c6..399e2c3 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/unexelf.c b/src/unexelf.c
index 6343207..5519157 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index bfb8bd4..827eda5 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/unexw32.c b/src/unexw32.c
index 460a39e..15aa726 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,11 +34,10 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 /* Include relevant definitions from IMAGEHLP.H, which can be found
    in \\win32sdk\mstools\samples\image\include\imagehlp.h. */
 
-PIMAGE_NT_HEADERS
-(__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress,
-                                   DWORD FileLength,
-                                   LPDWORD HeaderSum,
-                                   LPDWORD CheckSum);
+PIMAGE_NT_HEADERS (__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress,
+                                                      DWORD FileLength,
+                                                      LPDWORD HeaderSum,
+                                                      LPDWORD CheckSum);
 
 extern BOOL ctrl_c_handler (unsigned long type);
 
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 42f0470..7eeca3c 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w16select.c b/src/w16select.c
index 48bb813..434a598 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -686,7 +686,7 @@ For MS-Windows and MS-DOS:
 When sending or receiving text via selection and clipboard, the text
 is encoded or decoded by this coding system.  The default value is
 the current system default encoding on 9x/Me, `utf-16le-dos'
-(Unicode) on NT/W2K/XP, and `iso-latin-1-dos' on MS-DOS.
+\(Unicode) on NT/W2K/XP, and `iso-latin-1-dos' on MS-DOS.
 
 For X Windows:
 When sending text via selection and clipboard, if the target
diff --git a/src/w32.c b/src/w32.c
index ccf7cc3..3f4ac88 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -8772,6 +8772,30 @@ sys_write (int fd, const void * buffer, unsigned int 
count)
       unsigned long nblock = 0;
       if (winsock_lib == NULL) emacs_abort ();
 
+      child_process *cp = fd_info[fd].cp;
+
+      /* If this is a non-blocking socket whose connection is in
+        progress or terminated with an error already, return the
+        proper error code to the caller. */
+      if (cp != NULL && (fd_info[fd].flags & FILE_CONNECT) != 0)
+       {
+         /* In case connection is in progress, ENOTCONN that would
+            result from calling pfn_send is not what callers expect. */
+         if (cp->status != STATUS_CONNECT_FAILED)
+           {
+             errno = EWOULDBLOCK;
+             return -1;
+           }
+         /* In case connection failed, use the actual error code
+            stashed by '_sys_wait_connect' in cp->errcode. */
+         else if (cp->errcode != 0)
+           {
+             pfn_WSASetLastError (cp->errcode);
+             set_errno ();
+             return -1;
+           }
+       }
+
       /* TODO: implement select() properly so non-blocking I/O works. */
       /* For now, make sure the write blocks.  */
       if (fd_info[fd].flags & FILE_NDELAY)
@@ -8782,14 +8806,8 @@ sys_write (int fd, const void * buffer, unsigned int 
count)
       if (nchars == SOCKET_ERROR)
         {
          set_errno ();
-         /* If this is a non-blocking socket whose connection is in
-            progress, return the proper error code to the caller;
-            ENOTCONN is not what they expect . */
-         if (errno == ENOTCONN && (fd_info[fd].flags & FILE_CONNECT) != 0)
-           errno = EWOULDBLOCK;
-         else
-           DebPrint (("sys_write.send failed with error %d on socket %ld\n",
-                      pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
+         DebPrint (("sys_write.send failed with error %d on socket %ld\n",
+                    pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
        }
 
       /* Set the socket back to non-blocking if it was before,
diff --git a/src/w32.h b/src/w32.h
index fde3803..42a1c42 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32common.h b/src/w32common.h
index 4fbeab5..f30c0ce 100644
--- a/src/w32common.h
+++ b/src/w32common.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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/>.
-   
+
 */
 
 #ifndef W32COMMON_H
diff --git a/src/w32console.c b/src/w32console.c
index fdadd48..82ba4b1 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32fns.c b/src/w32fns.c
index 568a45a..a08474f 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -5609,7 +5609,7 @@ x_get_focus_frame (struct frame *frame)
 
 DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
        doc: /* Internal function called by `color-defined-p', which see.
-(Note that the Nextstep version of this function ignores FRAME.)  */)
+\(Note that the Nextstep version of this function ignores FRAME.)  */)
   (Lisp_Object color, Lisp_Object frame)
 {
   XColor foo;
@@ -5751,7 +5751,7 @@ If omitted or nil, that stands for the selected frame's 
display.  */)
 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
        doc: /* Return the "vendor ID" string of the GUI software on TERMINAL.
 
-(Labeling every distributor as a "vendor" embodies the false assumption
+\(Labeling every distributor as a "vendor" embodies the false assumption
 that operating systems cannot be developed and distributed noncommercially.)
 
 For GNU and Unix systems, this queries the X server software; for
@@ -6153,7 +6153,7 @@ DISPLAY is the name of the display to connect to.
 Optional second arg XRM-STRING is a string of resources in xrdb format.
 If the optional third arg MUST-SUCCEED is non-nil,
 terminate Emacs if we can't open the connection.
-(In the Nextstep version, the last two arguments are currently ignored.)  */)
+\(In the Nextstep version, the last two arguments are currently ignored.)  */)
   (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed)
 {
   char *xrm_option;
@@ -8522,7 +8522,7 @@ DEFUN ("w32-set-mouse-absolute-pixel-position", 
Fw32_set_mouse_absolute_pixel_po
        Sw32_set_mouse_absolute_pixel_position, 2, 2, 0,
        doc: /* Move mouse pointer to absolute pixel position (X, Y).
 The coordinates X and Y are interpreted in pixels relative to a position
-(0, 0) of the selected frame's display.  */)
+\(0, 0) of the selected frame's display.  */)
   (Lisp_Object x, Lisp_Object y)
 {
   UINT trail_num = 0;
diff --git a/src/w32font.c b/src/w32font.c
index 0c3efe2..a1878ad 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32font.h b/src/w32font.h
index a3fd357..728ad8b 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32gui.h b/src/w32gui.h
index ff7af87..8e995cf 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32heap.c b/src/w32heap.c
index b908169..df2fe0a 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -73,12 +73,11 @@ typedef PVOID (WINAPI * RtlCreateHeap_Proc) (
 
 typedef LONG NTSTATUS;
 
-typedef NTSTATUS
-(NTAPI * PRTL_HEAP_COMMIT_ROUTINE)(
-                                   IN PVOID Base,
-                                   IN OUT PVOID *CommitAddress,
-                                   IN OUT PSIZE_T CommitSize
-                                   );
+typedef NTSTATUS (NTAPI *PRTL_HEAP_COMMIT_ROUTINE) (
+                                                   IN PVOID Base,
+                                                   IN OUT PVOID *CommitAddress,
+                                                   IN OUT PSIZE_T CommitSize
+                                                   );
 
 typedef struct _RTL_HEAP_PARAMETERS {
   ULONG Length;
diff --git a/src/w32heap.h b/src/w32heap.h
index c569033..523bceb 100644
--- a/src/w32heap.h
+++ b/src/w32heap.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32inevt.c b/src/w32inevt.c
index c7246c7..a33f82d 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32inevt.h b/src/w32inevt.h
index b23c787..c317196 100644
--- a/src/w32inevt.h
+++ b/src/w32inevt.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32menu.c b/src/w32menu.c
index d8c3dc1..d9ab8f5 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32notify.c b/src/w32notify.c
index 71787c4..586c206 100644
--- a/src/w32notify.c
+++ b/src/w32notify.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32proc.c b/src/w32proc.c
index 85ddbfd..4a6f786 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32reg.c b/src/w32reg.c
index 7d1ccf8..a873818 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32select.c b/src/w32select.c
index ce4ed69..138fe85 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32select.h b/src/w32select.h
index 8216380..54022f7 100644
--- a/src/w32select.h
+++ b/src/w32select.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32term.c b/src/w32term.c
index 36a5021..62ad4eb 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32term.h b/src/w32term.h
index 7c23bc4..d809be3 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index c5ba87b..ddca5f5 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 29636d1..04bf5ce 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/widget.c b/src/widget.c
index a71de90..28bb475 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/widget.h b/src/widget.h
index 13eb9e7..ceeec38 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/widgetprv.h b/src/widgetprv.h
index 24e8378..9d9aa21 100644
--- a/src/widgetprv.h
+++ b/src/widgetprv.h
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/window.c b/src/window.c
index be34c49..3cfb6fc 100644
--- a/src/window.c
+++ b/src/window.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -671,7 +671,7 @@ DEFUN ("set-window-combination-limit", 
Fset_window_combination_limit, Sset_windo
 WINDOW must be a valid window used in horizontal or vertical combination.
 If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's
 siblings.  LIMIT t means that child windows of WINDOW are never
-(re-)combined with WINDOW's siblings.  Other values are reserved for
+\(re-)combined with WINDOW's siblings.  Other values are reserved for
 future use.  */)
   (Lisp_Object window, Lisp_Object limit)
 {
@@ -1355,7 +1355,7 @@ DEFUN ("coordinates-in-window-p", 
Fcoordinates_in_window_p,
 WINDOW must be a live window and defaults to the selected one.
 COORDINATES is a cons of the form (X . Y), X and Y being distances
 measured in characters from the upper-left corner of the frame.
-(0 . 0) denotes the character in the upper left corner of the
+\(0 . 0) denotes the character in the upper left corner of the
 frame.
 If COORDINATES are in the text portion of WINDOW,
    the coordinates relative to the window are returned.
@@ -1741,7 +1741,7 @@ of the window.  The remaining elements are omitted if the 
character after
 POS is fully visible; otherwise, RTOP and RBOT are the number of pixels
 off-window at the top and bottom of the screen line ("row") containing
 POS, ROWH is the visible height of that row, and VPOS is the row number
-(zero-based).  */)
+\(zero-based).  */)
   (Lisp_Object pos, Lisp_Object window, Lisp_Object partially)
 {
   struct window *w;
diff --git a/src/window.h b/src/window.h
index 2c03033..84180c9 100644
--- a/src/window.h
+++ b/src/window.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xdisp.c b/src/xdisp.c
index 5b96144..123303e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -31389,7 +31389,7 @@ This variable is not guaranteed to be accurate except 
while processing
 
   DEFVAR_LISP ("frame-title-format", Vframe_title_format,
     doc: /* Template for displaying the title bar of visible frames.
-(Assuming the window manager supports this feature.)
+\(Assuming the window manager supports this feature.)
 
 This variable has the same structure as `mode-line-format', except that
 the %c and %l constructs are ignored.  It is used only on frames for
@@ -31397,10 +31397,10 @@ which no explicit name has been set (see 
`modify-frame-parameters').  */);
 
   DEFVAR_LISP ("icon-title-format", Vicon_title_format,
     doc: /* Template for displaying the title bar of an iconified frame.
-(Assuming the window manager supports this feature.)
+\(Assuming the window manager supports this feature.)
 This variable has the same structure as `mode-line-format' (which see),
 and is used only on frames for which no explicit name has been set
-(see `modify-frame-parameters').  */);
+\(see `modify-frame-parameters').  */);
   Vicon_title_format
     = Vframe_title_format
     = listn (CONSTYPE_PURE, 3,
diff --git a/src/xfaces.c b/src/xfaces.c
index 7762e0f..ac13700 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -701,10 +701,10 @@ Optional THOROUGHLY non-nil means try to free unused 
fonts, too.  */)
 DEFUN ("bitmap-spec-p", Fbitmap_spec_p, Sbitmap_spec_p, 1, 1, 0,
        doc: /* Value is non-nil if OBJECT is a valid bitmap specification.
 A bitmap specification is either a string, a file name, or a list
-(WIDTH HEIGHT DATA) where WIDTH is the pixel width of the bitmap,
+\(WIDTH HEIGHT DATA) where WIDTH is the pixel width of the bitmap,
 HEIGHT is its height, and DATA is a string containing the bits of
 the pixmap.  Bits are stored row by row, each row occupies
-(WIDTH + 7)/8 bytes.  */)
+\(WIDTH + 7)/8 bytes.  */)
   (Lisp_Object object)
 {
   bool pixmap_p = false;
@@ -6536,7 +6536,7 @@ changing this variable for it to take effect.  */);
 Each element is a cons (FONT-PATTERN . RESCALE-RATIO), where
 FONT-PATTERN is a font-spec or a regular expression matching a font name, and
 RESCALE-RATIO is a floating point number to specify how much larger
-(or smaller) font we should use.  For instance, if a face requests
+\(or smaller) font we should use.  For instance, if a face requests
 a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point.  */);
   Vface_font_rescale_alist = Qnil;
 
diff --git a/src/xfns.c b/src/xfns.c
index 596b67c..74c559a 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -3669,7 +3669,7 @@ x_focus_frame (struct frame *f)
 
 DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
        doc: /* Internal function called by `color-defined-p', which see.
-(Note that the Nextstep version of this function ignores FRAME.)  */)
+\(Note that the Nextstep version of this function ignores FRAME.)  */)
   (Lisp_Object color, Lisp_Object frame)
 {
   XColor foo;
@@ -3836,7 +3836,7 @@ If omitted or nil, that stands for the selected frame's 
display.  */)
 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
        doc: /* Return the "vendor ID" string of the GUI software on TERMINAL.
 
-(Labeling every distributor as a "vendor" embodies the false assumption
+\(Labeling every distributor as a "vendor" embodies the false assumption
 that operating systems cannot be developed and distributed noncommercially.)
 The optional argument TERMINAL specifies which display to ask about.
 
@@ -4261,8 +4261,19 @@ x_get_monitor_attributes_xrandr (struct x_display_info 
*dpyinfo)
   RROutput pxid = None;
   struct MonitorInfo *monitors;
 
-#ifdef HAVE_XRRGETSCREENRESOURCESCURRENT
-  resources = XRRGetScreenResourcesCurrent (dpy, dpyinfo->root_window);
+#define RANDR13_LIBRARY \
+  (RANDR_MAJOR > 1 || (RANDR_MAJOR == 1 && RANDR_MINOR >= 3))
+
+#if RANDR13_LIBRARY
+  /* Check if the display supports 1.3 too.  */
+  bool randr13_avail = (dpyinfo->xrandr_major_version > 1
+                       || (dpyinfo->xrandr_major_version == 1
+                           && dpyinfo->xrandr_minor_version >= 3));
+
+  if (randr13_avail)
+    resources = XRRGetScreenResourcesCurrent (dpy, dpyinfo->root_window);
+  else
+    resources = XRRGetScreenResources (dpy, dpyinfo->root_window);
 #else
   resources = XRRGetScreenResources (dpy, dpyinfo->root_window);
 #endif
@@ -4275,8 +4286,9 @@ x_get_monitor_attributes_xrandr (struct x_display_info 
*dpyinfo)
   n_monitors = resources->noutput;
   monitors = xzalloc (n_monitors * sizeof *monitors);
 
-#ifdef HAVE_XRRGETOUTPUTPRIMARY
-  pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window);
+#ifdef RANDR13_LIBRARY
+  if (randr13_avail)
+    pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window);
 #endif
 
   for (i = 0; i < n_monitors; ++i)
@@ -4359,9 +4371,11 @@ x_get_monitor_attributes (struct x_display_info *dpyinfo)
   xrr_ok = XRRQueryExtension (dpy, &xrr_event_base, &xrr_error_base);
   if (xrr_ok)
     {
-      int xrr_major, xrr_minor;
-      XRRQueryVersion (dpy, &xrr_major, &xrr_minor);
-      xrr_ok = (xrr_major == 1 && xrr_minor >= 2) || xrr_major > 1;
+      XRRQueryVersion (dpy, &dpyinfo->xrandr_major_version,
+                      &dpyinfo->xrandr_minor_version);
+      xrr_ok = ((dpyinfo->xrandr_major_version == 1
+                && dpyinfo->xrandr_minor_version >= 2)
+               || dpyinfo->xrandr_major_version > 1);
     }
 
   if (xrr_ok)
@@ -4758,7 +4772,7 @@ DEFUN ("x-set-mouse-absolute-pixel-position", 
Fx_set_mouse_absolute_pixel_positi
        Sx_set_mouse_absolute_pixel_position, 2, 2, 0,
        doc: /* Move mouse pointer to absolute pixel position (X, Y).
 The coordinates X and Y are interpreted in pixels relative to a position
-(0, 0) of the selected frame's display.  */)
+\(0, 0) of the selected frame's display.  */)
   (Lisp_Object x, Lisp_Object y)
   {
   struct frame *f = SELECTED_FRAME ();
@@ -4934,7 +4948,7 @@ DISPLAY is the name of the display to connect to.
 Optional second arg XRM-STRING is a string of resources in xrdb format.
 If the optional third arg MUST-SUCCEED is non-nil,
 terminate Emacs if we can't open the connection.
-(In the Nextstep version, the last two arguments are currently ignored.)  */)
+\(In the Nextstep version, the last two arguments are currently ignored.)  */)
   (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed)
 {
   char *xrm_option;
diff --git a/src/xfont.c b/src/xfont.c
index 15a4b74..0ef64be 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xftfont.c b/src/xftfont.c
index d94955f..7926325 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xgselect.c b/src/xgselect.c
index a61d46b..ac88afd 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xgselect.h b/src/xgselect.h
index fc976ca..4c56633 100644
--- a/src/xgselect.h
+++ b/src/xgselect.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xmenu.c b/src/xmenu.c
index 1047b19..9e1a817 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xml.c b/src/xml.c
index 6c47a9d..b1175d1 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xrdb.c b/src/xrdb.c
index 865acc9..b4bc118 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -9,8 +9,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xselect.c b/src/xselect.c
index 23b735e..123e463 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1911,7 +1911,7 @@ DEFUN ("x-own-selection-internal", 
Fx_own_selection_internal,
        Sx_own_selection_internal, 2, 3, 0,
        doc: /* Assert an X selection of type SELECTION and value VALUE.
 SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-(Those are literal upper-case symbol names, since that's what X expects.)
+\(Those are literal upper-case symbol names, since that's what X expects.)
 VALUE is typically a string, or a cons of two markers, but may be
 anything that the functions on `selection-converter-alist' know about.
 
@@ -1940,7 +1940,7 @@ DEFUN ("x-get-selection-internal", 
Fx_get_selection_internal,
        Sx_get_selection_internal, 2, 4, 0,
        doc: /* Return text selected from some X window.
 SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-(Those are literal upper-case symbol names, since that's what X expects.)
+\(Those are literal upper-case symbol names, since that's what X expects.)
 TARGET-TYPE is the type of data desired, typically `STRING'.
 
 TIME-STAMP is the time to use in the XConvertSelection call for foreign
@@ -2044,7 +2044,7 @@ DEFUN ("x-selection-owner-p", Fx_selection_owner_p, 
Sx_selection_owner_p,
        doc: /* Whether the current Emacs process owns the given X Selection.
 The arg should be the name of the selection in question, typically one of
 the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-(Those are literal upper-case symbol names, since that's what X expects.)
+\(Those are literal upper-case symbol names, since that's what X expects.)
 For convenience, the symbol nil is the same as `PRIMARY',
 and t is the same as `SECONDARY'.
 
@@ -2620,7 +2620,7 @@ and the local selection value (whatever was given to
 `x-own-selection-internal').
 
 The function should return the value to send to the X server
-(typically a string).  A return value of nil
+\(typically a string).  A return value of nil
 means that the conversion could not be done.
 A return value which is the symbol `NULL'
 means that a side-effect was executed,
@@ -2629,10 +2629,10 @@ and there is no meaningful selection value.  */);
 
   DEFVAR_LISP ("x-lost-selection-functions", Vx_lost_selection_functions,
               doc: /* A list of functions to be called when Emacs loses an X 
selection.
-(This happens when some other X client makes its own selection
+\(This happens when some other X client makes its own selection
 or when a Lisp program explicitly clears the selection.)
 The functions are called with one argument, the selection type
-(a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD').  */);
+\(a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD').  */);
   Vx_lost_selection_functions = Qnil;
 
   DEFVAR_LISP ("x-sent-selection-functions", Vx_sent_selection_functions,
diff --git a/src/xsettings.c b/src/xsettings.c
index 28075b5..d7af68f 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xsettings.h b/src/xsettings.h
index 74e28b4..fa2b5c5 100644
--- a/src/xsettings.h
+++ b/src/xsettings.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xsmfns.c b/src/xsmfns.c
index df5c46b..296b1cc 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xterm.c b/src/xterm.c
index 1f71afd..ba9bf50 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/xterm.h b/src/xterm.h
index 3a78292..8e1fc78 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -459,6 +459,11 @@ struct x_display_info
   /* SM */
   Atom Xatom_SM_CLIENT_ID;
 
+#ifdef HAVE_XRANDR
+  int xrandr_major_version;
+  int xrandr_minor_version;
+#endif
+
 #ifdef USE_CAIRO
   XExtCodes *ext_codes;
 #endif
diff --git a/src/xwidget.c b/src/xwidget.c
index f436e95..d438d87 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -387,9 +387,12 @@ webkit_download_cb (WebKitWebView *webkitwebview,
 }
 
 static gboolean
-webkit_mime_type_policy_typedecision_requested_cb
-(WebKitWebView *webView, WebKitWebFrame *frame, WebKitNetworkRequest *request,
- gchar *mimetype, WebKitWebPolicyDecision *policy_decision, gpointer user_data)
+webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *webView,
+                                                  WebKitWebFrame *frame,
+                                                  WebKitNetworkRequest 
*request,
+                                                  gchar *mimetype,
+                                                  WebKitWebPolicyDecision 
*policy_decision,
+                                                  gpointer user_data)
 {
   /* This function makes webkit send a download signal for all unknown
      mime types.  TODO: Defer the decision to Lisp, so that it's
@@ -404,10 +407,12 @@ webkit_mime_type_policy_typedecision_requested_cb
 }
 
 static gboolean
-webkit_new_window_policy_decision_requested_cb
-(WebKitWebView *webView, WebKitWebFrame *frame, WebKitNetworkRequest *request,
- WebKitWebNavigationAction *navigation_action,
- WebKitWebPolicyDecision *policy_decision, gpointer user_data)
+webkit_new_window_policy_decision_requested_cb (WebKitWebView *webView,
+                                               WebKitWebFrame *frame,
+                                               WebKitNetworkRequest *request,
+                                               WebKitWebNavigationAction 
*navigation_action,
+                                               WebKitWebPolicyDecision 
*policy_decision,
+                                               gpointer user_data)
 {
   struct xwidget *xw = g_object_get_data (G_OBJECT (webView), XG_XWIDGET);
   webkit_web_navigation_action_get_original_uri (navigation_action);
@@ -419,10 +424,12 @@ webkit_new_window_policy_decision_requested_cb
 }
 
 static gboolean
-webkit_navigation_policy_decision_requested_cb
-(WebKitWebView *webView, WebKitWebFrame *frame, WebKitNetworkRequest *request,
- WebKitWebNavigationAction *navigation_action,
- WebKitWebPolicyDecision *policy_decision, gpointer user_data)
+webkit_navigation_policy_decision_requested_cb (WebKitWebView *webView,
+                                               WebKitWebFrame *frame,
+                                               WebKitNetworkRequest *request,
+                                               WebKitWebNavigationAction 
*navigation_action,
+                                               WebKitWebPolicyDecision 
*policy_decision,
+                                               gpointer user_data)
 {
   struct xwidget *xw = g_object_get_data (G_OBJECT (webView), XG_XWIDGET);
   store_xwidget_event_string (xw, "navigation-policy-decision-requested",
diff --git a/src/xwidget.h b/src/xwidget.h
index 1e11f11..8fc3821 100644
--- a/src/xwidget.h
+++ b/src/xwidget.h
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/test/automated/dabbrev-tests.el b/test/automated/dabbrev-tests.el
new file mode 100644
index 0000000..9c7a838
--- /dev/null
+++ b/test/automated/dabbrev-tests.el
@@ -0,0 +1,42 @@
+;;; dabbrev-tests.el --- Test suite for dabbrev.
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Alan Third <address@hidden>
+;; Keywords: dabbrev
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; 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/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ert)
+(require 'dabbrev)
+
+(ert-deftest dabbrev-expand-test ()
+  "Test for bug#1948.
+When DABBREV-ELIMINATE-NEWLINES is non-nil (the default),
+repeated calls to DABBREV-EXPAND can result in the source of
+first expansion being replaced rather than the destination."
+  (with-temp-buffer
+   (insert "ab  x\na\nab  y")
+   (goto-char 8)
+   (save-window-excursion
+     (set-window-buffer nil (current-buffer))
+     ;; M-/ SPC M-/ M-/
+     (execute-kbd-macro "\257 \257\257"))
+   (should (string= (buffer-string) "ab  x\nab y\nab  y"))))
diff --git a/test/lisp/progmodes/ruby-mode-tests.el 
b/test/lisp/progmodes/ruby-mode-tests.el
index da8d77c..4fa7470 100644
--- a/test/lisp/progmodes/ruby-mode-tests.el
+++ b/test/lisp/progmodes/ruby-mode-tests.el
@@ -91,6 +91,15 @@ VALUES-PLIST is a list with alternating index and value 
elements."
 (ert-deftest ruby-no-heredoc-inside-quotes ()
   (ruby-assert-state "\"<<\", \"\",\nfoo" 3 nil))
 
+(ert-deftest ruby-no-heredoc-left-shift ()
+  ;; We can't really detect the left shift operator (like in similar
+  ;; cases, it depends on the type of foo), so we just require for <<
+  ;; to be preceded by a character from a known set.
+  (ruby-assert-state "foo(a<<b)" 3 nil))
+
+(ert-deftest ruby-no-heredoc-class-self ()
+  (ruby-assert-state "class <<self\nend" 3 nil))
+
 (ert-deftest ruby-exit!-font-lock ()
   (ruby-assert-face "exit!" 5 font-lock-builtin-face))
 
@@ -461,6 +470,14 @@ VALUES-PLIST is a list with alternating index and value 
elements."
   (ruby-assert-face "%S{foo}" 4 nil)
   (ruby-assert-face "%R{foo}" 4 nil))
 
+(ert-deftest ruby-no-nested-percent-literals ()
+  (ruby-with-temp-buffer "a = %w[b %()]"
+    (syntax-propertize (point))
+    (should (null (nth 8 (syntax-ppss))))
+    (should (eq t (nth 3 (syntax-ppss (1- (point-max))))))
+    (search-backward "[")
+    (should (eq t (nth 3 (syntax-ppss))))))
+
 (ert-deftest ruby-add-log-current-method-examples ()
   (let ((pairs '(("foo" . "#foo")
                  ("C.foo" . ".foo")
diff --git a/test/lisp/xml-tests.el b/test/lisp/xml-tests.el
index 763febb..488d2c6 100644
--- a/test/lisp/xml-tests.el
+++ b/test/lisp/xml-tests.el
@@ -72,7 +72,12 @@
     ;; Invalid XML names
     "<0foo>abc</0foo>"
     "<‿foo>abc</‿foo>"
-    "<f¿>abc</f¿>")
+    "<f¿>abc</f¿>"
+    ;; Two root tags
+    "<a/><b></b>"
+    ;; Bug#16344
+    "<!----><x>< /x>"
+    "<a>< b/></a>")
   "List of XML strings that should signal an error in the parser")
 
 (defvar xml-parse-tests--qnames
diff --git a/test/manual/etags/CTAGS.good b/test/manual/etags/CTAGS.good
index ebde715..19bc0be 100644
--- a/test/manual/etags/CTAGS.good
+++ b/test/manual/etags/CTAGS.good
@@ -305,8 +305,6 @@ BUFFER_OBJFWDP      c-src/emacs/src/lisp.h  
/^BUFFER_OBJFWDP (union Lisp_Fwd *a)$/
 BYTE_MARK_STACK        c-src/emacs/src/lisp.h  3181
 Bar    lua-src/test.lua        /^function Square.something:Bar ()$/
 Bar    perl-src/kai-test.pl    /^package Bar;$/
-Bar::f4        perl-src/kai-test.pl    /^sub Bar::f4 {$/
-Bar::f5        perl-src/kai-test.pl    /^sub f5 {$/
 Barrier_Function_Pointer/t     ada-src/etags-test-for.ada      /^   type 
Barrier_Function_Pointer is access$/
 Bidule/b       ada-src/etags-test-for.ada      /^  protected body Bidule is$/
 Bidule/b       ada-src/waroquiers.ada  /^  protected body Bidule is$/
@@ -614,8 +612,6 @@ Finalize_TAS_Cell/p ada-src/2ataspri.ads    /^   procedure 
Finalize_TAS_Cell   (Cel
 First100Chars  pas-src/common.pas      /^procedure First100Chars; (*($/
 Foo    perl-src/kai-test.pl    /^package Foo;$/
 Foo::Bar       perl-src/kai-test.pl    /^package Foo::Bar;$/
-Foo::Bar::f6   perl-src/kai-test.pl    /^sub f6 {$/
-Foo::f3        perl-src/kai-test.pl    /^sub f3 {$/
 Forth_help     c-src/etags.c   573
 Forth_suffixes c-src/etags.c   571
 Forth_words    c-src/etags.c   /^Forth_words (FILE *inf)$/
@@ -2931,7 +2927,14 @@ f        cp-src/c.C      /^     void f() {}$/
 f      cp-src/fail.C   /^              int f() { return 5; }$/
 f      cp-src/fail.C   /^int A::B::f() { return 2; }$/
 f1     c.c     /^     f1 () { \/* Do something. *\/; }$/
+f1     perl-src/kai-test.pl    /^sub f1 {$/
 f2     c.c     /^void f2 () { \/* Do something. *\/; }$/
+f2     perl-src/kai-test.pl    /^sub main::f2 {$/
+f3     perl-src/kai-test.pl    /^sub f3 {$/
+f4     perl-src/kai-test.pl    /^sub Bar::f4 {$/
+f5     perl-src/kai-test.pl    /^sub f5 {$/
+f6     perl-src/kai-test.pl    /^sub f6 {$/
+f7     perl-src/kai-test.pl    /^sub f7 {$/
 fast_string_match_ignore_case  c-src/emacs/src/lisp.h  
/^fast_string_match_ignore_case (Lisp_Object regexp,/
 fastctags      make-src/Makefile       /^fastctags:$/
 fastetags      make-src/Makefile       /^fastetags:$/
@@ -2952,6 +2955,7 @@ fignore   c-src/etags.c   2416
 file-of-tag    el-src/emacs/lisp/progmodes/etags.el    /^(defun file-of-tag 
(&optional relative)$/
 file-of-tag-function   el-src/emacs/lisp/progmodes/etags.el    /^(defvar 
file-of-tag-function nil$/
 fileJoin       php-src/lce_functions.php       /^  function fileJoin()$/
+file_end       perl-src/htlmify-cystic /^sub file_end ()$/
 file_index     perl-src/htlmify-cystic 33
 file_tocs      perl-src/htlmify-cystic 30
 filename_is_absolute   c-src/etags.c   /^filename_is_absolute (char *fn)$/
@@ -2978,6 +2982,10 @@ find-tag-tag-order       
el-src/emacs/lisp/progmodes/etags.el    /^(defvar find-tag-tag-o
 find_entries   c-src/etags.c   /^find_entries (FILE *inf)$/
 find_user_signal_name  c-src/emacs/src/keyboard.c      /^find_user_signal_name 
(int sig)$/
 findcats       prol-src/natded.prolog  /^findcats([],Left,Left).$/
+finish_appendices      perl-src/htlmify-cystic /^sub finish_appendices ()$/
+finish_sections        perl-src/htlmify-cystic /^sub finish_sections ()$/
+finish_subsections     perl-src/htlmify-cystic /^sub finish_subsections ()$/
+finish_subsubsections  perl-src/htlmify-cystic /^sub finish_subsubsections ()$/
 finlist        c-src/etags.c   2414
 first  c-src/emacs/src/gmalloc.c       151
 fitchtreelist  prol-src/natded.prolog  /^fitchtreelist([]).$/
@@ -3085,6 +3093,7 @@ get_layer_by_name lua-src/allegro.lua     /^local 
function get_layer_by_name (sprite
 get_tag        c-src/etags.c   /^get_tag (register char *bp, char **namepp)$/
 get_word       c-src/tab.c     /^static char           *get_word(char **str, 
char delim)$/
 getcjmp        c-src/emacs/src/keyboard.c      147
+getopt perl-src/yagrip.pl      /^sub getopt {$/
 getopt.o       make-src/Makefile       /^getopt.o: emacs\/lib-src\/getopt.c$/
 getopt1.o      make-src/Makefile       /^getopt1.o: emacs\/lib-src\/getopt1.c$/
 getptys        objc-src/Subprocess.m   /^getptys (int *master, int *slave)$/
@@ -3419,23 +3428,6 @@ mach_reply_port  c-src/machsyscalls.h    /^SYSCALL 
(mach_reply_port, -26,$/
 mach_task_self c-src/machsyscalls.h    /^SYSCALL (mach_task_self, -28,$/
 mach_thread_self       c-src/machsyscalls.h    /^SYSCALL (mach_thread_self, 
-27,$/
 magic  c-src/emacs/src/gmalloc.c       1863
-main::f1       perl-src/kai-test.pl    /^sub f1 {$/
-main::f2       perl-src/kai-test.pl    /^sub main::f2 {$/
-main::f7       perl-src/kai-test.pl    /^sub f7 {$/
-main::file_end perl-src/htlmify-cystic /^sub file_end ()$/
-main::finish_appendices        perl-src/htlmify-cystic /^sub finish_appendices 
()$/
-main::finish_sections  perl-src/htlmify-cystic /^sub finish_sections ()$/
-main::finish_subsections       perl-src/htlmify-cystic /^sub 
finish_subsections ()$/
-main::finish_subsubsections    perl-src/htlmify-cystic /^sub 
finish_subsubsections ()$/
-main::getopt   perl-src/yagrip.pl      /^sub getopt {$/
-main::read_toc perl-src/htlmify-cystic /^sub read_toc ()$/
-main::section_href     perl-src/htlmify-cystic /^sub section_href ($)$/
-main::section_name     perl-src/htlmify-cystic /^sub section_name ($)$/
-main::section_url      perl-src/htlmify-cystic /^sub section_url ()$/
-main::section_url_base perl-src/htlmify-cystic /^sub section_url_base ()$/
-main::section_url_name perl-src/htlmify-cystic /^sub section_url_name ()$/
-main::toc_line perl-src/htlmify-cystic /^sub toc_line ($)$/
-main::usage    perl-src/yagrip.pl      /^sub usage {$/
 maintaining.info       make-src/Makefile       /^maintaining.info: 
maintaining.texi$/
 make-abbrev-table      c-src/abbrev.c  /^DEFUN ("make-abbrev-table", 
Fmake_abbrev_table, Sm/
 make_C_tag     c-src/etags.c   /^make_C_tag (bool isfun)$/
@@ -3922,6 +3914,7 @@ read_key_sequence_cmd     c-src/emacs/src/keyboard.c      
232
 read_key_sequence_remapped     c-src/emacs/src/keyboard.c      233
 read_key_sequence_vs   c-src/emacs/src/keyboard.c      /^read_key_sequence_vs 
(Lisp_Object prompt, Lisp_Obj/
 read_menu_command      c-src/emacs/src/keyboard.c      /^read_menu_command 
(void)$/
+read_toc       perl-src/htlmify-cystic /^sub read_toc ()$/
 readable_events        c-src/emacs/src/keyboard.c      /^readable_events (int 
flags)$/
 readline       c-src/etags.c   /^readline (linebuffer *lbp, FILE *stream)$/
 readline_internal      c-src/etags.c   /^readline_internal (linebuffer *lbp, 
register FILE /
@@ -4027,8 +4020,13 @@ scroll_bar_parts c-src/emacs/src/keyboard.c      5189
 sec=\relax     tex-src/texinfo.tex     /^\\let\\appendixsec=\\relax$/
 section        perl-src/htlmify-cystic 25
 section=\relax tex-src/texinfo.tex     /^\\let\\appendixsection=\\relax$/
+section_href   perl-src/htlmify-cystic /^sub section_href ($)$/
 section_name   perl-src/htlmify-cystic 12
+section_name   perl-src/htlmify-cystic /^sub section_name ($)$/
 section_toc    perl-src/htlmify-cystic 15
+section_url    perl-src/htlmify-cystic /^sub section_url ()$/
+section_url_base       perl-src/htlmify-cystic /^sub section_url_base ()$/
+section_url_name       perl-src/htlmify-cystic /^sub section_url_name ()$/
 select prol-src/natded.prolog  /^select(X,[X|Xs],Xs).$/
 select-tags-table      el-src/emacs/lisp/progmodes/etags.el    /^(defun 
select-tags-table ()$/
 select-tags-table-mode el-src/emacs/lisp/progmodes/etags.el    
/^(define-derived-mode select-tags-table-mode specia/
@@ -4324,6 +4322,7 @@ timers_run        c-src/emacs/src/keyboard.c      320
 tinbody        c-src/etags.c   2431
 tkeyseen       c-src/etags.c   2429
 tnone  c-src/etags.c   2428
+toc_line       perl-src/htlmify-cystic /^sub toc_line ($)$/
 toggleDescription      objc-src/PackInsp.m     /^-toggleDescription$/
 tok    c-src/etags.c   2491
 token  c-src/etags.c   2508
@@ -4396,6 +4395,7 @@ unsignedp cccp.y  113
 unsignedp      y-src/cccp.y    112
 uprintmax_t    c-src/emacs/src/lisp.h  149
 uprintmax_t    c-src/emacs/src/lisp.h  154
+usage  perl-src/yagrip.pl      /^sub usage {$/
 usecharno      c-src/etags.c   210
 used   c-src/emacs/src/regex.h 347
 used_syntax    c-src/emacs/src/regex.h 398
diff --git a/test/manual/etags/ETAGS.good_1 b/test/manual/etags/ETAGS.good_1
index d255086..58661bb 100644
--- a/test/manual/etags/ETAGS.good_1
+++ b/test/manual/etags/ETAGS.good_1
@@ -2665,7 +2665,7 @@ define("TEST"TEST1,0
 test 4,26
 foo(16,200
 
-perl-src/htlmify-cystic,1443
+perl-src/htlmify-cystic,1197
 my @section_name;section_name12,236
 my @appendix_name;appendix_name13,254
 my @section_toc;section_toc15,274
@@ -2683,7 +2683,7 @@ my $output_file;output_file35,556
 my $line;line37,574
 my $subsection_marker;subsection_marker161,3883
 my $new;new163,3907
-sub read_toc main::read_toc165,3917
+sub read_toc 165,3917
          my $entry entry218,5621
          my $entry entry234,6077
              my $entry entry245,6351
@@ -2692,38 +2692,38 @@ sub read_toc main::read_toc165,3917
              my $entry entry276,7204
          my $entry entry281,7328
       my $entry entry296,7698
-sub finish_subsubsections main::finish_subsubsections302,7805
-sub finish_subsections main::finish_subsections309,7987
-sub finish_sections main::finish_sections320,8310
-sub finish_appendices main::finish_appendices331,8599
-sub section_url_base main::section_url_base337,8724
-sub section_url_name main::section_url_name342,8922
-sub section_url main::section_url355,9284
+sub finish_subsubsections 302,7805
+sub finish_subsections 309,7987
+sub finish_sections 320,8310
+sub finish_appendices 331,8599
+sub section_url_base 337,8724
+sub section_url_name 342,8922
+sub section_url 355,9284
   my $name name357,9336
-sub section_href main::section_href364,9452
-sub section_name main::section_name368,9551
-sub toc_line main::toc_line372,9655
-sub file_end main::file_end375,9750
+sub section_href 364,9452
+sub section_name 368,9551
+sub toc_line 372,9655
+sub file_end 375,9750
 
-perl-src/yagrip.pl,258
-sub getopt main::getopt7,156
+perl-src/yagrip.pl,233
+sub getopt 7,156
        local($_,$flag,$opt,$f,$r,@temp)($_,$flag,$opt,$f,$r,@temp8,169
-sub usage main::usage38,856
+sub usage 38,856
        local($prog,$_,@list)($prog,$_,@list39,868
        
local($string,$flag,@string,@temp,@last)($string,$flag,@string,@temp,@last40,897
 
-perl-src/kai-test.pl,244
-sub f1 main::f12,16
-sub main::f2 6,50
+perl-src/kai-test.pl,203
+sub f1 2,16
+sub main::f2 f26,50
 package Foo;10,90
-sub f3 Foo::f312,104
-sub Bar::f4 16,138
+sub f3 12,104
+sub Bar::f4 f416,138
 package Bar;20,177
-sub f5 Bar::f522,191
+sub f5 22,191
 package Foo::Bar;26,225
-sub f6 Foo::Bar::f628,244
+sub f6 28,244
 package main;32,278
-sub f7 main::f734,293
+sub f7 34,293
 
 ps-src/rfc1245.ps,2478
 /FMversion 12,311
diff --git a/test/manual/etags/ETAGS.good_2 b/test/manual/etags/ETAGS.good_2
index 9eb1d42..ecfa7d1 100644
--- a/test/manual/etags/ETAGS.good_2
+++ b/test/manual/etags/ETAGS.good_2
@@ -3235,7 +3235,7 @@ define("TEST"TEST1,0
 test 4,26
 foo(16,200
 
-perl-src/htlmify-cystic,1443
+perl-src/htlmify-cystic,1197
 my @section_name;section_name12,236
 my @appendix_name;appendix_name13,254
 my @section_toc;section_toc15,274
@@ -3253,7 +3253,7 @@ my $output_file;output_file35,556
 my $line;line37,574
 my $subsection_marker;subsection_marker161,3883
 my $new;new163,3907
-sub read_toc main::read_toc165,3917
+sub read_toc 165,3917
          my $entry entry218,5621
          my $entry entry234,6077
              my $entry entry245,6351
@@ -3262,38 +3262,38 @@ sub read_toc main::read_toc165,3917
              my $entry entry276,7204
          my $entry entry281,7328
       my $entry entry296,7698
-sub finish_subsubsections main::finish_subsubsections302,7805
-sub finish_subsections main::finish_subsections309,7987
-sub finish_sections main::finish_sections320,8310
-sub finish_appendices main::finish_appendices331,8599
-sub section_url_base main::section_url_base337,8724
-sub section_url_name main::section_url_name342,8922
-sub section_url main::section_url355,9284
+sub finish_subsubsections 302,7805
+sub finish_subsections 309,7987
+sub finish_sections 320,8310
+sub finish_appendices 331,8599
+sub section_url_base 337,8724
+sub section_url_name 342,8922
+sub section_url 355,9284
   my $name name357,9336
-sub section_href main::section_href364,9452
-sub section_name main::section_name368,9551
-sub toc_line main::toc_line372,9655
-sub file_end main::file_end375,9750
+sub section_href 364,9452
+sub section_name 368,9551
+sub toc_line 372,9655
+sub file_end 375,9750
 
-perl-src/yagrip.pl,258
-sub getopt main::getopt7,156
+perl-src/yagrip.pl,233
+sub getopt 7,156
        local($_,$flag,$opt,$f,$r,@temp)($_,$flag,$opt,$f,$r,@temp8,169
-sub usage main::usage38,856
+sub usage 38,856
        local($prog,$_,@list)($prog,$_,@list39,868
        
local($string,$flag,@string,@temp,@last)($string,$flag,@string,@temp,@last40,897
 
-perl-src/kai-test.pl,244
-sub f1 main::f12,16
-sub main::f2 6,50
+perl-src/kai-test.pl,203
+sub f1 2,16
+sub main::f2 f26,50
 package Foo;10,90
-sub f3 Foo::f312,104
-sub Bar::f4 16,138
+sub f3 12,104
+sub Bar::f4 f416,138
 package Bar;20,177
-sub f5 Bar::f522,191
+sub f5 22,191
 package Foo::Bar;26,225
-sub f6 Foo::Bar::f628,244
+sub f6 28,244
 package main;32,278
-sub f7 main::f734,293
+sub f7 34,293
 
 ps-src/rfc1245.ps,2478
 /FMversion 12,311
diff --git a/test/manual/etags/ETAGS.good_3 b/test/manual/etags/ETAGS.good_3
index 1f5a342..5f84aa9 100644
--- a/test/manual/etags/ETAGS.good_3
+++ b/test/manual/etags/ETAGS.good_3
@@ -3012,7 +3012,7 @@ test 4,26
        var $test12,176
 foo(16,200
 
-perl-src/htlmify-cystic,1443
+perl-src/htlmify-cystic,1197
 my @section_name;section_name12,236
 my @appendix_name;appendix_name13,254
 my @section_toc;section_toc15,274
@@ -3030,7 +3030,7 @@ my $output_file;output_file35,556
 my $line;line37,574
 my $subsection_marker;subsection_marker161,3883
 my $new;new163,3907
-sub read_toc main::read_toc165,3917
+sub read_toc 165,3917
          my $entry entry218,5621
          my $entry entry234,6077
              my $entry entry245,6351
@@ -3039,38 +3039,38 @@ sub read_toc main::read_toc165,3917
              my $entry entry276,7204
          my $entry entry281,7328
       my $entry entry296,7698
-sub finish_subsubsections main::finish_subsubsections302,7805
-sub finish_subsections main::finish_subsections309,7987
-sub finish_sections main::finish_sections320,8310
-sub finish_appendices main::finish_appendices331,8599
-sub section_url_base main::section_url_base337,8724
-sub section_url_name main::section_url_name342,8922
-sub section_url main::section_url355,9284
+sub finish_subsubsections 302,7805
+sub finish_subsections 309,7987
+sub finish_sections 320,8310
+sub finish_appendices 331,8599
+sub section_url_base 337,8724
+sub section_url_name 342,8922
+sub section_url 355,9284
   my $name name357,9336
-sub section_href main::section_href364,9452
-sub section_name main::section_name368,9551
-sub toc_line main::toc_line372,9655
-sub file_end main::file_end375,9750
+sub section_href 364,9452
+sub section_name 368,9551
+sub toc_line 372,9655
+sub file_end 375,9750
 
-perl-src/yagrip.pl,258
-sub getopt main::getopt7,156
+perl-src/yagrip.pl,233
+sub getopt 7,156
        local($_,$flag,$opt,$f,$r,@temp)($_,$flag,$opt,$f,$r,@temp8,169
-sub usage main::usage38,856
+sub usage 38,856
        local($prog,$_,@list)($prog,$_,@list39,868
        
local($string,$flag,@string,@temp,@last)($string,$flag,@string,@temp,@last40,897
 
-perl-src/kai-test.pl,244
-sub f1 main::f12,16
-sub main::f2 6,50
+perl-src/kai-test.pl,203
+sub f1 2,16
+sub main::f2 f26,50
 package Foo;10,90
-sub f3 Foo::f312,104
-sub Bar::f4 16,138
+sub f3 12,104
+sub Bar::f4 f416,138
 package Bar;20,177
-sub f5 Bar::f522,191
+sub f5 22,191
 package Foo::Bar;26,225
-sub f6 Foo::Bar::f628,244
+sub f6 28,244
 package main;32,278
-sub f7 main::f734,293
+sub f7 34,293
 
 ps-src/rfc1245.ps,2478
 /FMversion 12,311
diff --git a/test/manual/etags/ETAGS.good_4 b/test/manual/etags/ETAGS.good_4
index b8a3d9d..12e2a65 100644
--- a/test/manual/etags/ETAGS.good_4
+++ b/test/manual/etags/ETAGS.good_4
@@ -2829,7 +2829,7 @@ define("TEST"TEST1,0
 test 4,26
 foo(16,200
 
-perl-src/htlmify-cystic,1443
+perl-src/htlmify-cystic,1197
 my @section_name;section_name12,236
 my @appendix_name;appendix_name13,254
 my @section_toc;section_toc15,274
@@ -2847,7 +2847,7 @@ my $output_file;output_file35,556
 my $line;line37,574
 my $subsection_marker;subsection_marker161,3883
 my $new;new163,3907
-sub read_toc main::read_toc165,3917
+sub read_toc 165,3917
          my $entry entry218,5621
          my $entry entry234,6077
              my $entry entry245,6351
@@ -2856,38 +2856,38 @@ sub read_toc main::read_toc165,3917
              my $entry entry276,7204
          my $entry entry281,7328
       my $entry entry296,7698
-sub finish_subsubsections main::finish_subsubsections302,7805
-sub finish_subsections main::finish_subsections309,7987
-sub finish_sections main::finish_sections320,8310
-sub finish_appendices main::finish_appendices331,8599
-sub section_url_base main::section_url_base337,8724
-sub section_url_name main::section_url_name342,8922
-sub section_url main::section_url355,9284
+sub finish_subsubsections 302,7805
+sub finish_subsections 309,7987
+sub finish_sections 320,8310
+sub finish_appendices 331,8599
+sub section_url_base 337,8724
+sub section_url_name 342,8922
+sub section_url 355,9284
   my $name name357,9336
-sub section_href main::section_href364,9452
-sub section_name main::section_name368,9551
-sub toc_line main::toc_line372,9655
-sub file_end main::file_end375,9750
+sub section_href 364,9452
+sub section_name 368,9551
+sub toc_line 372,9655
+sub file_end 375,9750
 
-perl-src/yagrip.pl,258
-sub getopt main::getopt7,156
+perl-src/yagrip.pl,233
+sub getopt 7,156
        local($_,$flag,$opt,$f,$r,@temp)($_,$flag,$opt,$f,$r,@temp8,169
-sub usage main::usage38,856
+sub usage 38,856
        local($prog,$_,@list)($prog,$_,@list39,868
        
local($string,$flag,@string,@temp,@last)($string,$flag,@string,@temp,@last40,897
 
-perl-src/kai-test.pl,244
-sub f1 main::f12,16
-sub main::f2 6,50
+perl-src/kai-test.pl,203
+sub f1 2,16
+sub main::f2 f26,50
 package Foo;10,90
-sub f3 Foo::f312,104
-sub Bar::f4 16,138
+sub f3 12,104
+sub Bar::f4 f416,138
 package Bar;20,177
-sub f5 Bar::f522,191
+sub f5 22,191
 package Foo::Bar;26,225
-sub f6 Foo::Bar::f628,244
+sub f6 28,244
 package main;32,278
-sub f7 main::f734,293
+sub f7 34,293
 
 ps-src/rfc1245.ps,2478
 /FMversion 12,311
diff --git a/test/manual/etags/ETAGS.good_5 b/test/manual/etags/ETAGS.good_5
index 9e3b258..98de4f2 100644
--- a/test/manual/etags/ETAGS.good_5
+++ b/test/manual/etags/ETAGS.good_5
@@ -3746,7 +3746,7 @@ test 4,26
        var $test12,176
 foo(16,200
 
-perl-src/htlmify-cystic,1443
+perl-src/htlmify-cystic,1197
 my @section_name;section_name12,236
 my @appendix_name;appendix_name13,254
 my @section_toc;section_toc15,274
@@ -3764,7 +3764,7 @@ my $output_file;output_file35,556
 my $line;line37,574
 my $subsection_marker;subsection_marker161,3883
 my $new;new163,3907
-sub read_toc main::read_toc165,3917
+sub read_toc 165,3917
          my $entry entry218,5621
          my $entry entry234,6077
              my $entry entry245,6351
@@ -3773,38 +3773,38 @@ sub read_toc main::read_toc165,3917
              my $entry entry276,7204
          my $entry entry281,7328
       my $entry entry296,7698
-sub finish_subsubsections main::finish_subsubsections302,7805
-sub finish_subsections main::finish_subsections309,7987
-sub finish_sections main::finish_sections320,8310
-sub finish_appendices main::finish_appendices331,8599
-sub section_url_base main::section_url_base337,8724
-sub section_url_name main::section_url_name342,8922
-sub section_url main::section_url355,9284
+sub finish_subsubsections 302,7805
+sub finish_subsections 309,7987
+sub finish_sections 320,8310
+sub finish_appendices 331,8599
+sub section_url_base 337,8724
+sub section_url_name 342,8922
+sub section_url 355,9284
   my $name name357,9336
-sub section_href main::section_href364,9452
-sub section_name main::section_name368,9551
-sub toc_line main::toc_line372,9655
-sub file_end main::file_end375,9750
+sub section_href 364,9452
+sub section_name 368,9551
+sub toc_line 372,9655
+sub file_end 375,9750
 
-perl-src/yagrip.pl,258
-sub getopt main::getopt7,156
+perl-src/yagrip.pl,233
+sub getopt 7,156
        local($_,$flag,$opt,$f,$r,@temp)($_,$flag,$opt,$f,$r,@temp8,169
-sub usage main::usage38,856
+sub usage 38,856
        local($prog,$_,@list)($prog,$_,@list39,868
        
local($string,$flag,@string,@temp,@last)($string,$flag,@string,@temp,@last40,897
 
-perl-src/kai-test.pl,244
-sub f1 main::f12,16
-sub main::f2 6,50
+perl-src/kai-test.pl,203
+sub f1 2,16
+sub main::f2 f26,50
 package Foo;10,90
-sub f3 Foo::f312,104
-sub Bar::f4 16,138
+sub f3 12,104
+sub Bar::f4 f416,138
 package Bar;20,177
-sub f5 Bar::f522,191
+sub f5 22,191
 package Foo::Bar;26,225
-sub f6 Foo::Bar::f628,244
+sub f6 28,244
 package main;32,278
-sub f7 main::f734,293
+sub f7 34,293
 
 ps-src/rfc1245.ps,2478
 /FMversion 12,311
diff --git a/test/manual/etags/c-src/emacs/src/keyboard.c 
b/test/manual/etags/c-src/emacs/src/keyboard.c
index 077b147..68584ee 100644
--- a/test/manual/etags/c-src/emacs/src/keyboard.c
+++ b/test/manual/etags/c-src/emacs/src/keyboard.c
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/test/manual/etags/c-src/emacs/src/lisp.h 
b/test/manual/etags/c-src/emacs/src/lisp.h
index 96c52c0..db87229 100644
--- a/test/manual/etags/c-src/emacs/src/lisp.h
+++ b/test/manual/etags/c-src/emacs/src/lisp.h
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/test/manual/etags/c-src/etags.c b/test/manual/etags/c-src/etags.c
index 4465b83..4534198 100644
--- a/test/manual/etags/c-src/etags.c
+++ b/test/manual/etags/c-src/etags.c
@@ -35,8 +35,8 @@ This file is not considered part of GNU Emacs.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -613,8 +613,8 @@ static const char *Objc_suffixes [] =
 static const char Objc_help [] =
 "In Objective C code, tags include Objective C definitions for classes,\n\
 class categories, methods and protocols.  Tags for variables and\n\
-functions in classes are named `CLASS::VARIABLE' and `CLASS::FUNCTION'.\n\
-(Use --help --lang=c --lang=objc --lang=java for full help.)";
+functions in classes are named `CLASS::VARIABLE' and `CLASS::FUNCTION'.\
+\n(Use --help --lang=c --lang=objc --lang=java for full help.)";
 
 static const char *Pascal_suffixes [] =
   { "p", "pas", NULL };
diff --git a/test/manual/indent/js.js b/test/manual/indent/js.js
index 9a1e0dc..d843f61 100644
--- a/test/manual/indent/js.js
+++ b/test/manual/indent/js.js
@@ -72,7 +72,12 @@ baz(`http://foo.bar/${tee}`)
 class A {
   * x() {
     return 1
-      * 2;
+      * a(2);
+  }
+
+  *[Symbol.iterator]() {
+    yield "Foo";
+    yield "Bar";
   }
 }
 
diff --git a/test/manual/indent/ruby.rb b/test/manual/indent/ruby.rb
index dfd1c75..585263d 100644
--- a/test/manual/indent/ruby.rb
+++ b/test/manual/indent/ruby.rb
@@ -168,6 +168,15 @@ if x == :!=
   something
 end
 
+qux :+,
+    bar,
+    :[]=,
+    bar,
+    :a
+
+b = $:
+c = ??
+
 # Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html
 d = 4 + 5 +      # no '\' needed
     6 + 7
@@ -194,6 +203,9 @@ class C
     self.end
     D.new.class
   end
+
+  def begin
+  end
 end
 
 a = foo(j, k) -
@@ -223,6 +235,9 @@ z = {
 foo if
   bar
 
+fail "stuff" \
+  unless all_fine?
+
 if foo?
   bar
 end



reply via email to

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