emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master cb4e054 09/13: -


From: Paul Eggert
Subject: [Emacs-diffs] master cb4e054 09/13: -
Date: Sat, 30 Jan 2016 22:12:18 +0000

branch: master
commit cb4e054e41cdb7e398351a5ae8224759e721349e
Merge: e6d5753 6090275
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    -
---
 admin/check-doc-strings                            |    3 +-
 build-aux/gitlog-to-changelog                      |    4 +-
 build-aux/update-copyright                         |    4 +-
 configure.ac                                       |   16 +-
 doc/emacs/anti.texi                                |    2 +-
 doc/emacs/custom.texi                              |    4 +-
 doc/emacs/mule.texi                                |    2 +-
 doc/lispref/control.texi                           |   10 +-
 doc/lispref/display.texi                           |    2 +-
 doc/lispref/frames.texi                            |    6 +-
 doc/lispref/functions.texi                         |    6 +-
 doc/lispref/nonascii.texi                          |    6 +-
 doc/lispref/streams.texi                           |    6 +-
 doc/lispref/variables.texi                         |   39 ++----
 doc/lispref/windows.texi                           |   18 ++--
 doc/misc/dbus.texi                                 |    4 +-
 doc/misc/eww.texi                                  |    4 +-
 doc/misc/flymake.texi                              |    2 +-
 doc/misc/octave-mode.texi                          |    2 +-
 doc/misc/org.texi                                  |    6 +-
 doc/misc/reftex.texi                               |   10 +-
 doc/misc/texinfo.tex                               |   25 ++--
 doc/misc/tramp.texi                                |   23 ++--
 doc/misc/url.texi                                  |    2 +-
 doc/misc/wisent.texi                               |    4 +-
 etc/NEWS                                           |   32 ++--
 lib-src/rcs2log                                    |    4 +-
 lib/acl-internal.c                                 |    2 +-
 lib/acl-internal.h                                 |    2 +-
 lib/binary-io.h                                    |    2 +-
 lib/dirent.in.h                                    |    7 +
 lib/dirfd.c                                        |   66 +++++++++
 lib/dup2.c                                         |   51 +++++++
 lib/fcntl.c                                        |   87 ++++++++++++
 lib/fdopendir.c                                    |   36 +++++
 lib/get-permissions.c                              |    2 +-
 lib/mktime.c                                       |   12 +-
 lib/openat-proc.c                                  |  144 ++++++++++++--------
 lib/sig2str.h                                      |    2 +
 lib/stdint.in.h                                    |    5 +
 lib/strftime.c                                     |    2 +-
 lisp/ChangeLog.17                                  |    4 +-
 lisp/autorevert.el                                 |    4 +-
 lisp/cedet/mode-local.el                           |    4 +-
 lisp/cedet/semantic/senator.el                     |    2 +-
 lisp/cedet/semantic/wisent.el                      |    2 +-
 lisp/dos-fns.el                                    |    2 +-
 lisp/emacs-lisp/ert.el                             |    6 +-
 lisp/emacs-lisp/pcase.el                           |    2 +-
 lisp/emacs-lisp/tabulated-list.el                  |    1 -
 lisp/files-x.el                                    |   29 ++--
 lisp/files.el                                      |  123 +++++++++--------
 lisp/font-lock.el                                  |    8 +-
 lisp/frameset.el                                   |   14 +-
 lisp/gnus/gnus-agent.el                            |    2 +-
 lisp/gnus/gnus-art.el                              |    4 +-
 lisp/gnus/mm-util.el                               |    6 +-
 lisp/international/characters.el                   |    2 +-
 lisp/ldefs-boot.el                                 |    6 +-
 lisp/mail/mailclient.el                            |    2 +-
 lisp/man.el                                        |    2 +-
 lisp/mh-e/mh-search.el                             |    2 +-
 lisp/net/browse-url.el                             |    8 +-
 lisp/net/nsm.el                                    |    2 +-
 lisp/net/tramp-cmds.el                             |    2 +-
 lisp/net/tramp-gvfs.el                             |    2 +-
 lisp/org/ChangeLog.1                               |    2 +-
 lisp/org/org-crypt.el                              |    2 +-
 lisp/org/org-element.el                            |   10 +-
 lisp/org/org-feed.el                               |    2 +-
 lisp/org/org-mobile.el                             |    2 +-
 lisp/org/org.el                                    |    2 +-
 lisp/org/ox-ascii.el                               |    6 +-
 lisp/org/ox-icalendar.el                           |    2 +-
 lisp/org/ox-publish.el                             |    2 +-
 lisp/org/ox.el                                     |   18 ++--
 lisp/play/gamegrid.el                              |    2 +-
 lisp/play/gomoku.el                                |    2 +-
 lisp/progmodes/antlr-mode.el                       |    4 +-
 lisp/progmodes/cc-engine.el                        |    6 +-
 lisp/progmodes/etags.el                            |    2 +-
 lisp/progmodes/python.el                           |    4 +-
 lisp/progmodes/vhdl-mode.el                        |    4 +-
 lisp/simple.el                                     |    2 +-
 lisp/strokes.el                                    |    2 +-
 lisp/textmodes/flyspell.el                         |    3 +
 lisp/textmodes/ispell.el                           |    2 +-
 lisp/textmodes/reftex-vars.el                      |    2 +-
 lisp/tree-widget.el                                |    2 +-
 lisp/vc/pcvs.el                                    |    4 +-
 lisp/window.el                                     |    2 +-
 lisp/xwidget.el                                    |  113 ++++++++--------
 m4/dirfd.m4                                        |   16 ++-
 m4/dup2.m4                                         |   14 ++-
 m4/fcntl.m4                                        |   13 ++-
 m4/gnulib-comp.m4                                  |    3 +-
 m4/utimes.m4                                       |   22 +++-
 src/bidi.c                                         |    2 +-
 src/emacs.c                                        |    2 +-
 src/lisp.h                                         |    2 +-
 src/nsterm.m                                       |   45 ++++--
 src/w32.c                                          |    2 +-
 src/w32heap.c                                      |    4 +-
 src/w32term.c                                      |    4 +-
 src/window.c                                       |    2 +-
 src/xdisp.c                                        |    4 +-
 src/xfaces.c                                       |    2 +-
 src/xwidget.c                                      |   12 +-
 test/ChangeLog.1                                   |    4 +-
 test/manual/etags/c-src/emacs/src/lisp.h           |    2 +-
 .../etags/el-src/emacs/lisp/progmodes/etags.el     |    2 +-
 111 files changed, 807 insertions(+), 461 deletions(-)

diff --git a/admin/check-doc-strings b/admin/check-doc-strings
index 13e8b0c..63856d3 100755
--- a/admin/check-doc-strings
+++ b/admin/check-doc-strings
@@ -1,5 +1,5 @@
 : #-*- Perl -*-
-eval 'exec perl -S $0 ${1+"$@"}' # Portability kludge
+eval 'exec perl -S $0 "$@"' # Portability kludge
     if 0;
 
 # Author: Martin Buchholz
@@ -299,4 +299,3 @@ foreach my $fun (sort keys %texi_funtype) {
     print "nuke-this-doc: $fun $texi_funtype{$fun}\n";
   }
 }
-
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index a426504..a2513d0 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -1,9 +1,9 @@
-eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
   & eval 'exec perl -wS "$0" $argv:q'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2016-01-11 22:04'; # UTC
+my $VERSION = '2016-01-12 23:09'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 8c6ee1f..17ee6b1 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -1,9 +1,9 @@
-eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
   & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
     if 0;
 # Update an FSF copyright year list to include the current year.
 
-my $VERSION = '2016-01-11.22:04'; # UTC
+my $VERSION = '2016-01-12.23:13'; # UTC
 
 # Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
diff --git a/configure.ac b/configure.ac
index 50bc04b..4a0dc56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ emacs_config_options=
 optsep=
 dnl This is the documented way to record the args passed to configure,
 dnl rather than $ac_configure_args.
-for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
+for opt in "$@" CFLAGS CPPFLAGS LDFLAGS; do
   case $opt in
     -n | --no-create | --no-recursion)
       continue ;;
@@ -330,7 +330,7 @@ OPTION_DEFAULT_ON([tiff],[don't compile with TIFF image 
support])
 OPTION_DEFAULT_ON([gif],[don't compile with GIF image support])
 OPTION_DEFAULT_ON([png],[don't compile with PNG image support])
 OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support])
-OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing])
+OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing (experimental)])
 OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
 OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
 
@@ -3141,13 +3141,13 @@ AC_SUBST(LIBOTF_LIBS)
 AC_SUBST(M17N_FLT_CFLAGS)
 AC_SUBST(M17N_FLT_LIBS)
 
-USE_CAIRO=no
+HAVE_CAIRO=no
 if test "${HAVE_X11}" = "yes"; then
   if test "${with_cairo}" != "no"; then
     CAIRO_REQUIRED=1.12.0
     CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
-    EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE, USE_CAIRO=yes, :)
-    if test $USE_CAIRO = yes; then
+    EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE)
+    if test $HAVE_CAIRO = yes; then
       AC_DEFINE(USE_CAIRO, 1, [Define to 1 if using cairo.])
     else
       AC_MSG_ERROR([cairo requested but not found.])
@@ -4920,7 +4920,7 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then
   XMENU_OBJ=xmenu.o
   XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
   FONT_OBJ=xfont.o
-  if test "$USE_CAIRO" = "yes"; then
+  if test "$HAVE_CAIRO" = "yes"; then
     FONT_OBJ="ftfont.o ftcrfont.o"
   elif test "$HAVE_XFT" = "yes"; then
     FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
@@ -5268,7 +5268,7 @@ for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO 
IMAGEMAGICK SOUND GPM DBUS \
 
     case $opt in
       NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
-      CAIRO|TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
+      TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
       *) eval val=\${HAVE_$opt} ;;
     esac
     case x$val in
@@ -5295,7 +5295,7 @@ AS_ECHO(["  Does Emacs use -lXaw3d?                       
          ${HAVE_XAW3D
   Does Emacs use a gif library?                           ${HAVE_GIF} $LIBGIF
   Does Emacs use a png library?                           ${HAVE_PNG} $LIBPNG
   Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}
-  Does Emacs use cairo?                                   ${USE_CAIRO}
+  Does Emacs use cairo?                                   ${HAVE_CAIRO}
   Does Emacs use imagemagick?                             ${HAVE_IMAGEMAGICK}
   Does Emacs support sound?                               ${HAVE_SOUND}
   Does Emacs use -lgpm?                                   ${HAVE_GPM}
diff --git a/doc/emacs/anti.texi b/doc/emacs/anti.texi
index ae13ae0..ece4d94 100644
--- a/doc/emacs/anti.texi
+++ b/doc/emacs/anti.texi
@@ -197,7 +197,7 @@ for removing the whole bidi support when downgrading to 
Emacs 23.
 @item
 Horizontal scroll bars are no longer supported.  Enlarge your windows
 and frames instead, or use @code{truncate-lines} and the automatic
-horizontal scrolling of text that Emacs had since time immemoriam.
+horizontal scrolling of text that Emacs had since time immemorial.
 
 @item
 Emacs is again counting the height of a frame's menu and its tool bar
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 670848c..7be660c 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1299,8 +1299,8 @@ named @address@hidden On MS-DOS, the name of this file
 should be @file{_dir-locals.el}, due to limitations of the DOS
 filesystems.  If the filesystem is limited to 8+3 file names, the name
 of the file will be truncated by the OS to @file{_dir-loc.el}.
address@hidden You can also use files like @file{.dir-locals2.el}, which
-are loaded in addition.  This is useful when @file{.dir-locals.el} is
address@hidden You can also use @file{.dir-locals-2.el}, which
+is loaded in addition.  This is useful when @file{.dir-locals.el} is
 under version control in a shared repository and can't be used for
 personal customizations.  } in a
 directory.  Whenever Emacs visits any file in that directory or any of
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index bcde81b..40206d9 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1216,7 +1216,7 @@ using the internal Emacs representation.
   When Emacs runs on MS-Windows versions that are descendants of the
 NT family (Windows 2000, XP, Vista, Windows 7, and Windows 8), the
 value of @code{file-name-coding-system} is largely ignored, as Emacs
-by default uses APIs that allow to pass Unicode file names directly.
+by default uses APIs that allow passing Unicode file names directly.
 By contrast, on Windows 9X, file names are encoded using
 @code{file-name-coding-system}, which should be set to the codepage
 (@pxref{Coding Systems, codepage}) pertinent for the current system
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index df60347..6fa802d 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -302,8 +302,8 @@ predicate conditions that compare values of expressions 
against
 specific values known and written in advance.  However, sometimes it
 is useful to select alternatives based on more general conditions that
 distinguish between broad classes of values.  The @code{pcase} macro
-allows to choose between alternatives based on matching the value of
-an expression against a series of patterns.  A pattern can be a
+allows you to choose between alternatives based on matching the value
+of an expression against a series of patterns.  A pattern can be a
 literal value (comparison to literal values is what @code{cond} does),
 or it can be a more general description of the expected structure of
 the expression's value.
@@ -350,7 +350,7 @@ when called with the value being matched as its argument.
 @var{predfun} can be one of the possible forms described below.
 @item (guard @var{boolean-expression})
 Matches if @var{boolean-expression} evaluates to address@hidden  This
-allows to include in a UPattern boolean conditions that refer to
+allows you to include in a UPattern boolean conditions that refer to
 symbols bound to values (including the value being matched) by
 previous UPatterns.  Typically used inside an @code{and} UPattern, see
 below.  For example, @address@hidden(and x (guard (< x 10)))}} is a pattern
@@ -358,7 +358,7 @@ which matches any number smaller than 10 and let-binds the 
variable
 @code{x} to that number.
 @item (let @var{upattern} @var{expression})
 Matches if the specified @var{expression} matches the specified
address@hidden  This allows to match a pattern against the value of
address@hidden  This allows matching a pattern against the value of
 an @emph{arbitrary} expression, not just the expression that is the
 first argument to @code{pcase}.  (It is called @code{let} because
 @var{upattern} can bind symbols to values using the @var{symbol}
@@ -407,7 +407,7 @@ Here's an illustrative example of using UPatterns:
   (code           (message "Unknown return code %S" code)))
 @end example
 
-The QPatterns are more powerful.  They allow to match the value of the
+The QPatterns are more powerful.  They allow matching the value of the
 @var{expression} that is the first argument of @code{pcase} against
 specifications of its @emph{structure}.  For example, you can specify
 that the value must be a list of 2 elements whose first element is a
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index d770599..eaba03d 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4303,7 +4303,7 @@ divider ends above the bottom divider.
    Dividers can be dragged with the mouse and are therefore useful for
 adjusting the sizes of adjacent windows with the mouse.  They also serve
 to visually set apart adjacent windows when no scroll bars or mode lines
-are present.  The following three faces allow to customize the
+are present.  The following three faces allow the customization of the
 appearance of dividers:
 
 @table @code
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 614b7db..55d7242 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2403,8 +2403,8 @@ The resulting mouse position is not constrained to the 
native frame of
 The return value is not significant.
 @end defun
 
-On a graphical terminal the following two functions allow to retrieve
-and set the absolute position of the mouse cursor.
+On a graphical terminal the following two functions allow the absolute
+position of the mouse cursor to be retrieved and set.
 
 @defun mouse-absolute-pixel-position
 This function returns a cons cell (@var{x} . @var{y}) of the coordinates
@@ -2426,7 +2426,7 @@ This predicate function returns address@hidden if the 
mouse pointer
 displayed on @var{frame} is visible; otherwise it returns @code{nil}.
 @var{frame} omitted or @code{nil} means the selected frame.  This is
 useful when @code{make-pointer-invisible} is set to @code{t}: it
-allows to know if the pointer has been hidden.
+allows you to know if the pointer has been hidden.
 @xref{Mouse Avoidance,,,emacs, The Emacs Manual}.
 @end defun
 
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index c5f5b4c..a2e94c3 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1248,7 +1248,7 @@ Parent type: @code{array}.
 @item font-object
 @end table
 
-The optional @var{qualifier} allows to combine several applicable
+The optional @var{qualifier} allows combining several applicable
 methods.  If it is not present, the defined method is a @dfn{primary}
 method, responsible for providing the primary implementation of the
 generic function for the specialized arguments.  You can also define
@@ -1270,8 +1270,8 @@ The most specific of such methods will be run before any 
other method.
 Such methods normally use @code{cl-call-next-method}, described below,
 to invoke the other auxiliary or primary methods.
 @item :extra @var{string}
-This allows to add more methods, distinguished by @var{string}, for
-the same specializers and qualifiers.
+This allows you to add more methods, distinguished by @var{string},
+for the same specializers and qualifiers.
 @end table
 @end defmac
 
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index fca4023..9cf3b57 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1338,9 +1338,9 @@ operates on the contents of @var{string} instead of bytes 
in the buffer.
 @cindex null bytes, and decoding text
 @defvar inhibit-null-byte-detection
 If this variable has a address@hidden value, null bytes are ignored
-when detecting the encoding of a region or a string.  This allows to
-correctly detect the encoding of text that contains null bytes, such
-as Info files with Index nodes.
+when detecting the encoding of a region or a string.  This allows the
+encoding of text that contains null bytes to be correctly detected,
+such as Info files with Index nodes.
 @end defvar
 
 @defvar inhibit-iso-escape-detection
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi
index 80c194b..41bc71e 100644
--- a/doc/lispref/streams.texi
+++ b/doc/lispref/streams.texi
@@ -343,10 +343,10 @@ shared structures.  @xref{Circular Objects}.  Its default 
value is
 When reading or writing from the standard input/output streams of the
 Emacs process in batch mode, it is sometimes required to make sure any
 arbitrary binary data will be read/written verbatim, and/or that no
-translation of newlines to or from CR-LF pairs are performed.  This
+translation of newlines to or from CR-LF pairs is performed.  This
 issue does not exist on Posix hosts, only on MS-Windows and address@hidden
-The following function allows to control the I/O mode of any standard
-stream of the Emacs process.
+The following function allows you to control the I/O mode of any
+standard stream of the Emacs process.
 
 @defun set-binary-mode stream mode
 Switch @var{stream} into binary or text I/O mode.  If @var{mode} is
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 4270161..6c53e9b 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1765,33 +1765,20 @@ variables: by putting them in a special file, or by 
defining a
 @dfn{project class} for that directory.
 
 @defvr Constant dir-locals-file
-This constant is a wildcard pattern matching the name of files where
-Emacs expects to find directory-local variables.  Its value is
address@hidden@footnote{
-The MS-DOS version of Emacs uses @file{_dir-locals*.el} instead, due to
+This constant is the name of the file where Emacs expects to find the
+directory-local variables.  The name of the file is
address@hidden@footnote{
+The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to
 limitations of the DOS filesystems.
-}, and the most common file name to use is @file{.dir-locals.el}.
-
-Any file matching this name pattern in a directory causes Emacs to
-apply its settings when visiting files in that directory or any of its
-subdirectories (optionally, you can exclude subdirectories; see
-below).
-If some of the subdirectories have their own file matching
address@hidden, Emacs uses the settings from the deepest file
-it finds starting from the file's directory and moving up the
-directory tree.  The file specifies local variables as a specially
-formatted list; see @ref{Directory Variables, , Per-directory Local
-Variables, emacs, The GNU Emacs Manual}, for more details.
-
-If the same directory contains multiple such files (for instance,
address@hidden and @file{.dir-locals2.el}), then all of them
-are used in @code{string<} order.  This means that, if two files
-specify different values for the same variable, the file sorted after
-will override the value of the previous file (for instance, values in
address@hidden override those in @file{.dir-locals.el}).  Note
-that, because of how lexicographic order works, values in
address@hidden are overridden by values in @file{.dir-locals2.el}.
-This can be avoided by using @file{.dir-locals02.el} instead.
+}.  A file by that name in a directory causes Emacs to apply its
+settings to any file in that directory or any of its subdirectories
+(optionally, you can exclude subdirectories; see below).
+If some of the subdirectories have their own @file{.dir-locals.el}
+files, Emacs uses the settings from the deepest file it finds starting
+from the file's directory and moving up the directory tree.  The file
+specifies local variables as a specially formatted list; see
address@hidden Variables, , Per-directory Local Variables, emacs, The
+GNU Emacs Manual}, for more details.
 @end defvr
 
 @defun hack-dir-local-variables
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 7186791..ca756e3 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -383,8 +383,8 @@ as if @var{mini} were @code{nil}.
 If it doesn't find a suitable window, this function returns @code{nil}.
 @end defun
 
-The following function allows to retrieve the entire window tree of a
-frame:
+The following function allows the entire window tree of a frame to be
+retrieved:
 
 @defun window-tree &optional frame
 This function returns a list representing the window tree for frame
@@ -1476,7 +1476,7 @@ displaying a buffer only temporarily (@pxref{Temporary 
Displays}), and
 you want to continue working with the initial layout.
 
 The behavior can be fixed by making a new parent window when splitting
address@hidden  The variable described next allows to do that.
address@hidden  The variable described next allows that to be done.
 
 @defopt window-combination-limit
 This variable controls whether splitting a window shall make a new
@@ -1579,7 +1579,7 @@ combination limit of @var{W4} (the parent window of 
@var{W6} and
 
 Alternatively, the problems sketched above can be avoided by always
 resizing all windows in the same combination whenever one of its windows
-is split or deleted.  This also permits to split windows that would be
+is split or deleted.  This also permits splitting windows that would be
 otherwise too small for such an operation.
 
 @defopt window-combination-resize
@@ -2522,11 +2522,11 @@ windows are dedicated to another buffer 
(@pxref{Dedicated Windows}).
 
 @defun display-buffer-no-window buffer alist
 If @var{alist} has a address@hidden @code{allow-no-window} entry, then
-this function does not display @code{buffer}.  This allows to override
-the default action and avoid displaying the buffer.  It is assumed that
-when the caller specifies a address@hidden @code{allow-no-window} value
-it can handle a @code{nil} value returned from @code{display-buffer} in
-this case.
+this function does not display @code{buffer}.  This allows you to
+override the default action and avoid displaying the buffer.  It is
+assumed that when the caller specifies a address@hidden
address@hidden value it can handle a @code{nil} value returned
+from @code{display-buffer} in this case.
 @end defun
 
 To illustrate the use of action functions, consider the following
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index c5901af..f4ebfeb 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -138,8 +138,8 @@ name could be @samp{org.gnu.Emacs.TextEditor} or
 @section D-Bus version.
 
 D-Bus has evolved over the years.  New features have been added with
-new D-Bus versions.  There are two variables, which allow to determine
-the used D-Bus version.
+new D-Bus versions.  There are two variables, which allow the determination
+of the D-Bus version used.
 
 @defvar dbus-compiled-version
 This variable, a string, determines the version of D-Bus Emacs is
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
index 14f0a8d..0e9bedb 100644
--- a/doc/misc/eww.texi
+++ b/doc/misc/eww.texi
@@ -168,8 +168,8 @@ You can view stored bookmarks with @kbd{B}
 @kindex S
 @cindex Multiple Buffers
   To get summary of currently opened EWW buffers, press @kbd{S}
-(@code{eww-list-buffers}).  The @file{*eww buffers*} buffer allows to
-quickly kill, flip through and switch to specific EWW buffer.
+(@code{eww-list-buffers}).  The @file{*eww buffers*} buffer allows you
+to quickly kill, flip through and switch to specific EWW buffer.
 
 @findex eww-browse-with-external-browser
 @vindex shr-external-browser
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 99633b6..1c4644b 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -717,7 +717,7 @@ sort error menu items, which shows error messages first.
 Flymake is also able to interpret error message patterns missing err-text-idx
 information.  This is done by merely taking the rest of the matched line
 (@code{(substring line (match-end 0))}) as error text.  This trick allows
-to make use of a huge collection of error message line patterns from
+making use of a huge collection of error message line patterns from
 @code{compile.el}.  All these error patterns are appended to
 the end of @code{flymake-err-line-patterns}.
 
diff --git a/doc/misc/octave-mode.texi b/doc/misc/octave-mode.texi
index 65cc6a4..0307873 100644
--- a/doc/misc/octave-mode.texi
+++ b/doc/misc/octave-mode.texi
@@ -436,7 +436,7 @@ when Octave is waiting for input, or done sending output.
 @c You can use either 'plain' Emacs Info or the function @code{octave-help}
 @c as your Octave info reader (for @samp{help -i}).  In the former case,
 @c use @code{info_program ("info-emacs-info")}.
address@hidden The latter is perhaps more attractive because it allows to look 
up keys
address@hidden The latter is perhaps more attractive because it allows you to 
look up keys
 @c in the indices of @emph{several} info files related to Octave (provided
 @c that the Emacs variable @code{octave-help-files} is set correctly).  In
 @c this case, use @code{info_program ("info-emacs-octave-help")}.
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index ec676fc..a5239ac 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -12890,9 +12890,9 @@ including DocBook.}.
 When processing a document, @samp{texinfo} back-end generates a minimal file
 header along with a title page, a copyright page, and a menu.  You control
 the latter through the structure of the document (@pxref{Headings and
-sectioning structure}).  Various keywords allow to tweak the other parts.  It
-is also possible to give directions to install the document in the @samp{Top}
-node.
+sectioning structure}).  Various keywords allow you to tweak the other parts.
+It is also possible to give directions to install the document in the
address@hidden node.
 
 @subsubheading File header
 
diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi
index 3dc3ed4..ff7011c 100644
--- a/doc/misc/reftex.texi
+++ b/doc/misc/reftex.texi
@@ -5213,7 +5213,7 @@ mouse    @r{Highlighting is mouse driven.}
 both     @r{Both cursor and mouse trigger highlighting.}
 @end example
 
-Changing this variable requires to rebuild the selection and *toc*
+Changing this variable requires rebuilding the selection and *toc*
 buffers to become effective (keys @kbd{g} or @kbd{r}).
 @end defopt
 
@@ -5421,8 +5421,8 @@ after words.  Disabled indexing in comment lines.
 New command @code{reftex-create-bibtex-file} to create a new database
 with all entries referenced in the current document.
 @item
-New keys @kbd{e} and @kbd{E} allow to produce a BibTeX database file
-from entries marked in a citation selection buffer.
+New keys @kbd{e} and @kbd{E} allow you to produce a BibTeX database
+file from entries marked in a citation selection buffer.
 @end itemize
 
 @noindent @b{Version 4.21}
@@ -5610,8 +5610,8 @@ demand.
 @item
 Index support, along with many new options.
 @item
-The selection of keys for @code{\ref} and @code{\cite} now allows to
-select multiple items by marking entries with the @kbd{m} key.
+The selection of keys for @code{\ref} and @code{\cite} now allows you
+to select multiple items by marking entries with the @kbd{m} key.
 @item
 Fancyref support.
 @end itemize
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 936c32d..8b3c949 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-01-11.19}
+\def\texinfoversion{2016-01-20.20}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -4737,11 +4737,10 @@ end
   \def\_{\normalunderscore}%
   \def\-{}% @- shouldn't affect sorting
   %
-  \def\lbracechar{{\indexlbrace}}%
-  \def\rbracechar{{\indexrbrace}}%
-  \let\{=\lbracechar
-  \let\}=\rbracechar
-  %
+  \uccode`\1=`\{ \uppercase{\def\{{1}}%
+  \uccode`\1=`\} \uppercase{\def\}{1}}%
+  \let\lbracechar\{
+  \let\rbracechar\}
   %
   % Non-English letters.
   \def\AA{AA}%
@@ -4901,9 +4900,15 @@ end
   \indexdummies % Must do this here, since \bf, etc expand at this stage
   \useindexbackslash % \indexbackslash isn't defined now so it will be output 
                      % as is; and it will print as backslash.
+  % The braces around \indexbrace are recognized by texindex.
+  %
   % Get the string to sort by, by processing the index entry with all
   % font commands turned off.
   {\indexnofonts
+   \def\lbracechar{{\indexlbrace}}%
+   \def\rbracechar{{\indexrbrace}}%
+   \let\{=\lbracechar
+   \let\}=\rbracechar
    \indexnonalnumdisappear
    \xdef\indexsortkey{}%
    \let\sortas=\indexwritesortas
@@ -8526,10 +8531,6 @@ end
     }%
     \setcolor{\linkcolor}%
   \fi
-  %
-  % Float references are printed completely differently: "Figure 1.2"
-  % instead of "[somenode], p.3".  We distinguish them by the
-  % LABEL-title being set to a magic string.
   {%
     % Have to otherify everything special to allow the \csname to
     % include an _ in the xref name, etc.
@@ -8538,6 +8539,10 @@ end
     \expandafter\global\expandafter\let\expandafter\Xthisreftitle
       \csname XR#1-title\endcsname
   }%
+  %
+  % Float references are printed completely differently: "Figure 1.2"
+  % instead of "[somenode], p.3".  \iffloat distinguishes them by
+  % \Xthisreftitle being set to a magic string.
   \iffloat\Xthisreftitle
     % If the user specified the print name (third arg) to the ref,
     % print it instead of our usual "Figure 1.2".
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 37bf7ea..d01f9be 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -815,11 +815,9 @@ capable of servicing requests from @value{tramp}.
 @cindex method smb
 @cindex smb method
 
-This is another non-native @value{tramp} method.  @command{smbclient}
-connects to any host with SMB/CIFS protocol, such as MS Windows and
-Samba Servers running on Unixes.  Tests show this @value{tramp} method
-works with MS Windows NT, MS Windows 2000, MS Windows XP, MS Windows
-Vista, and MS Windows 7.
+This non-native @value{tramp} method connects via the Server Message
+Block (SMB) networking protocol to hosts running file servers that are
+typically based on @url{https://www.samba.org/,,Samba} or MS Windows.
 
 Using @command{smbclient} requires a few tweaks when working with
 @value{tramp}:
@@ -827,7 +825,7 @@ Using @command{smbclient} requires a few tweaks when 
working with
 The first directory in the localname must be a share name on the
 remote host.
 
-Since smb shares end in the @code{$} character, @value{tramp} must use
+Since SMB shares end in the @code{$} character, @value{tramp} must use
 @code{$$} when specifying those shares to avoid environment variable
 substitutions.
 
@@ -871,16 +869,17 @@ uses the anonymous user (without prompting for password). 
 This
 behavior is unlike other @value{tramp} methods, where local user name
 is substituted.
 
address@hidden method is unavailable if Emacs is run under a local user
-authentication context in MS Windows.  However such users can still
-access remote files using UNC file names instead of @value{tramp}:
+The @option{smb} method is unavailable if Emacs is run under a
+local user authentication context in MS Windows.  However such users
+can still access remote files using UNC file names instead of @value{tramp}:
 
 @example
 //melancholia/daniel$$/.emacs
 @end example
 
-UNC file name specification does not allow to specify a different user
-name for authentication like the @command{smbclient} can.
+UNC file name specification does not allow the specification of a
+different user name for authentication like the @command{smbclient}
+can.
 
 @item @option{adb}
 @cindex method adb
@@ -2830,7 +2829,7 @@ open.  That is why @value{tramp} prompts for the password 
again even
 if there is an @command{ssh} already open.
 
 Some @command{ssh} versions support a @code{ControlPersist} option,
-which allows to set the @code{ControlPath} provided the variable
+which allows you to set the @code{ControlPath} provided the variable
 @code{tramp-ssh-controlmaster-options} is customized as follows:
 
 @lisp
diff --git a/doc/misc/url.texi b/doc/misc/url.texi
index acdad6b..c468599 100644
--- a/doc/misc/url.texi
+++ b/doc/misc/url.texi
@@ -423,7 +423,7 @@ the directory specified by 
@code{url-configuration-directory}.
 @end defopt
 
 @defopt url-cookie-confirmation
-Specifies whether confirmation is require to accept cookies.
+Specifies whether confirmation is required to accept cookies.
 @end defopt
 
 @defopt url-cookie-multiple-line
diff --git a/doc/misc/wisent.texi b/doc/misc/wisent.texi
index a446293..b4efbda 100644
--- a/doc/misc/wisent.texi
+++ b/doc/misc/wisent.texi
@@ -1155,8 +1155,8 @@ It defaults to the start symbol defined in the grammar
 @end table
 @end defun
 
-The following two normal hooks permit to do some useful processing
-respectively before to start parsing, and after the parser terminated.
+The following two normal hooks permit doing some useful processing
+respectively before starting parsing, and after the parser terminated.
 
 @vindex wisent-pre-parse-hook
 @defvar wisent-pre-parse-hook
diff --git a/etc/NEWS b/etc/NEWS
index d6044ce..a1292db 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -142,7 +142,7 @@ and silent rules are now quieter.  To get the old behavior 
where
 build with 'make V=1'.
 
 ---
-** The configure option '--with-gameuser' now allows to specify a
+** The configure option '--with-gameuser' now allows you to specify a
 group instead of a user if its argument is prefixed by ':' (a colon).
 This will cause the game score files in ${localstatedir}/games/emacs
 to be owned by that group, and the helper program for updating them to
@@ -234,9 +234,8 @@ by default, and must be enabled by using the 
`--with-modules' option
 at configure time.
 
 +++
-** Any file of the form .dir-locals*.el is now considered a dir-local
-file, and multiple such files can be used in the same directory.  See
-the variable `dir-locals-file' for more information.
+** A second dir-local file (.dir-locals-2.el) is now accepted.
+See the variable `dir-locals-file-2' for more information.
 
 +++
 ** Network security (TLS/SSL certificate validity and the like) is
@@ -263,9 +262,9 @@ select-enable-primary is ineffective since the system 
doesn't
 have the equivalent of a primary selection.
 
 +++
-** New option `switch-to-buffer-in-dedicated-window' allows to customize
-how `switch-to-buffer' proceeds interactively when the selected window
-is strongly dedicated to its buffer.
+** New option `switch-to-buffer-in-dedicated-window' allows you to
+customize how `switch-to-buffer' proceeds interactively when the
+selected window is strongly dedicated to its buffer.
 
 +++
 ** The option `even-window-heights' has been renamed to
@@ -920,11 +919,12 @@ plist will contain a :peer element that has the output of
 ** Tramp
 
 +++
-*** New connection method "afp", which allows to access Mac OS X
+*** New connection method "afp", which allows you to access Mac OS X
 volumes via the Apple Filing Protocol.
 
 +++
-*** New connection method "nc", which allows to access dumb busyboxes.
+*** New connection method "nc", which allows you to access dumb
+busyboxes.
 
 +++
 *** Method-specific parameters can be overwritten now with variable
@@ -1288,7 +1288,7 @@ node "Generic Functions" in the Emacs Lisp manual for 
more details.
 let-bind the values stored in an alist.
 
 ---
-** `tildify-mode' allows to automatically insert hard spaces as one
+** `tildify-mode' allows automatic insertion of hard spaces as one
 types the text.  Breaking line after a single-character words is
 forbidden by Czech and Polish typography (and may be discouraged in
 other languages), so `auto-tildify-mode' makes it easier to create
@@ -1492,7 +1492,7 @@ commands other than the predefined `C-u'.
 
 +++
 ** New functions `filepos-to-bufferpos' and `bufferpos-to-filepos'.
-These allow to convert between buffer positions and the corresponding
+These allow conversion between buffer positions and the corresponding
 file byte offsets, given the file's encoding.
 
 +++
@@ -1615,14 +1615,14 @@ called interactively.
 ** New function `function-put' to use instead of `put' for function properties.
 
 +++
-** The new function `bidi-find-overridden-directionality' allows to
+** The new function `bidi-find-overridden-directionality' allows you to
 find characters whose directionality was, perhaps maliciously,
 overridden by directional override control characters.  Lisp programs
 can use this to detect potential phishing of URLs and other links that
 exploits bidirectional display reordering.
 
 +++
-** The new function `buffer-substring-with-bidi-context' allows to
+** The new function `buffer-substring-with-bidi-context' allows you to
 copy a portion of a buffer into a different location while preserving
 the visual appearance both of the copied text and the text at
 destination, even when the copied text includes mixed bidirectional
@@ -1745,7 +1745,7 @@ undocumented integer-pair format.  Instead, they return a 
list of two
 integers.
 
 +++
-** New function `set-binary-mode' allows to switch a standard stream
+** New function `set-binary-mode' allows switching a standard stream
 of the Emacs process to binary I/O mode.
 
 +++
@@ -1856,8 +1856,8 @@ fullwidth frames, the behavior may depend on the toolkit 
used.
    number of columns or lines it displays.
 
 +++
-*** New function `window-preserve-size' allows to preserve the size of
-windows without "fixing" it.  It's supported by `fit-window-to-buffer',
+*** New function `window-preserve-size' allows you to preserve the size of
+a window without "fixing" it.  It's supported by `fit-window-to-buffer',
 `temp-buffer-resize-mode' and `display-buffer'.
 
 +++
diff --git a/lib-src/rcs2log b/lib-src/rcs2log
index 73213c5..ff4d470 100755
--- a/lib-src/rcs2log
+++ b/lib-src/rcs2log
@@ -403,8 +403,8 @@ case $rlogfile in
        esac
 
        case $datearg in
-       ?*) $rlog $rlog_options "$datearg" ${1+"$@"} >$rlogfile;;
-       '') $rlog $rlog_options ${1+"$@"} >$rlogfile;;
+       ?*) $rlog $rlog_options "$datearg" "$@" >$rlogfile;;
+       '') $rlog $rlog_options "$@" >$rlogfile;;
        esac || exit;;
 esac
 
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index 569e2f9..4de60c3 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -478,7 +478,7 @@ acl_nontrivial (int count, struct acl *entries)
 void
 free_permission_context (struct permission_context *ctx)
 {
-#ifdef USE_ACL
+#if USE_ACL
 # if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
   if (ctx->acl)
     acl_free (ctx->acl);
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 526e9f0..636273e 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -255,7 +255,7 @@ extern int acl_nontrivial (int count, struct acl *entries);
 
 struct permission_context {
   mode_t mode;
-#ifdef USE_ACL
+#if USE_ACL
 # if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
   acl_t acl;
 #  if !HAVE_ACL_TYPE_EXTENDED
diff --git a/lib/binary-io.h b/lib/binary-io.h
index d5c8233..9f17c0d 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -60,7 +60,7 @@ set_binary_mode (int fd, int mode)
 
 /* SET_BINARY (fd);
    changes the file descriptor fd to perform binary I/O.  */
-#ifdef __DJGPP__
+#if defined __DJGPP__ || defined __EMX__
 # include <unistd.h> /* declares isatty() */
   /* Avoid putting stdin/stdout in binary mode if it is connected to
      the console, because that would make it impossible for the user
diff --git a/lib/dirent.in.h b/lib/dirent.in.h
index 4c62737..65482d7 100644
--- a/lib/dirent.in.h
+++ b/lib/dirent.in.h
@@ -158,6 +158,13 @@ _GL_WARN_ON_USE (closedir, "closedir is not portable - "
 #  endif
 _GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (dirfd, int, (DIR *));
+
+#  ifdef __KLIBC__
+/* Gnulib internal hooks needed to maintain the dirfd metadata.  */
+_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp)
+     _GL_ARG_NONNULL ((2));
+_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd);
+#  endif
 # else
 #  if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
     /* dirfd is defined as a macro and not as a function.
diff --git a/lib/dirfd.c b/lib/dirfd.c
index 1ea2a63..a325848 100644
--- a/lib/dirfd.c
+++ b/lib/dirfd.c
@@ -22,11 +22,77 @@
 #include <dirent.h>
 #include <errno.h>
 
+#ifdef __KLIBC__
+# include <stdlib.h>
+# include <io.h>
+
+static struct dirp_fd_list
+{
+  DIR *dirp;
+  int fd;
+  struct dirp_fd_list *next;
+} *dirp_fd_start = NULL;
+
+/* Register fd associated with dirp to dirp_fd_list. */
+int
+_gl_register_dirp_fd (int fd, DIR *dirp)
+{
+  struct dirp_fd_list *new_dirp_fd = malloc (sizeof *new_dirp_fd);
+  if (!new_dirp_fd)
+    return -1;
+
+  new_dirp_fd->dirp = dirp;
+  new_dirp_fd->fd = fd;
+  new_dirp_fd->next = dirp_fd_start;
+
+  dirp_fd_start = new_dirp_fd;
+
+  return 0;
+}
+
+/* Unregister fd from dirp_fd_list with closing it */
+void
+_gl_unregister_dirp_fd (int fd)
+{
+  struct dirp_fd_list *dirp_fd;
+  struct dirp_fd_list *dirp_fd_prev;
+
+  for (dirp_fd_prev = NULL, dirp_fd = dirp_fd_start; dirp_fd;
+       dirp_fd_prev = dirp_fd, dirp_fd = dirp_fd->next)
+    {
+      if (dirp_fd->fd == fd)
+        {
+          if (dirp_fd_prev)
+            dirp_fd_prev->next = dirp_fd->next;
+          else  /* dirp_fd == dirp_fd_start */
+            dirp_fd_start = dirp_fd_start->next;
+
+          close (fd);
+          free (dirp_fd);
+          break;
+        }
+    }
+}
+#endif
+
 int
 dirfd (DIR *dir_p)
 {
   int fd = DIR_TO_FD (dir_p);
   if (fd == -1)
+#ifndef __KLIBC__
     errno = ENOTSUP;
+#else
+    {
+      struct dirp_fd_list *dirp_fd;
+
+      for (dirp_fd = dirp_fd_start; dirp_fd; dirp_fd = dirp_fd->next)
+        if (dirp_fd->dirp == dir_p)
+          return dirp_fd->fd;
+
+      errno = EINVAL;
+    }
+#endif
+
   return fd;
 }
diff --git a/lib/dup2.c b/lib/dup2.c
index c913f47..5d026f2 100644
--- a/lib/dup2.c
+++ b/lib/dup2.c
@@ -85,6 +85,57 @@ ms_windows_dup2 (int fd, int desired_fd)
 
 #  define dup2 ms_windows_dup2
 
+# elif defined __KLIBC__
+
+#  include <InnoTekLIBC/backend.h>
+
+static int
+klibc_dup2dirfd (int fd, int desired_fd)
+{
+  int tempfd;
+  int dupfd;
+
+  tempfd = open ("NUL", O_RDONLY);
+  if (tempfd == -1)
+    return -1;
+
+  if (tempfd == desired_fd)
+    {
+      close (tempfd);
+
+      char path[_MAX_PATH];
+      if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
+        return -1;
+
+      return open(path, O_RDONLY);
+    }
+
+  dupfd = klibc_dup2dirfd (fd, desired_fd);
+
+  close (tempfd);
+
+  return dupfd;
+}
+
+static int
+klibc_dup2 (int fd, int desired_fd)
+{
+  int dupfd;
+  struct stat sbuf;
+
+  dupfd = dup2 (fd, desired_fd);
+  if (dupfd == -1 && errno == ENOTSUP \
+      && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+    {
+      close (desired_fd);
+
+      return klibc_dup2dirfd (fd, desired_fd);
+    }
+
+  return dupfd;
+}
+
+#  define dup2 klibc_dup2
 # endif
 
 int
diff --git a/lib/fcntl.c b/lib/fcntl.c
index 1ccc5ac..fd17e96 100644
--- a/lib/fcntl.c
+++ b/lib/fcntl.c
@@ -162,6 +162,93 @@ dupfd (int oldfd, int newfd, int flags)
 }
 #endif /* W32 */
 
+#ifdef __KLIBC__
+
+# define INCL_DOS
+# include <os2.h>
+
+static int
+klibc_fcntl (int fd, int action, /* arg */...)
+{
+  va_list arg_ptr;
+  int arg;
+  struct stat sbuf;
+  int result = -1;
+
+  va_start (arg_ptr, action);
+  arg = va_arg (arg_ptr, int);
+  result = fcntl (fd, action, arg);
+  /* EPERM for F_DUPFD, ENOTSUP for others */
+  if (result == -1 && (errno == EPERM || errno == ENOTSUP)
+      && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+  {
+    ULONG ulMode;
+
+    switch (action)
+      {
+      case F_DUPFD:
+        /* Find available fd */
+        while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
+          arg++;
+
+        result = dup2 (fd, arg);
+        break;
+
+      /* Using underlying APIs is right ? */
+      case F_GETFD:
+        if (DosQueryFHState (fd, &ulMode))
+          break;
+
+        result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
+        break;
+
+      case F_SETFD:
+        if (arg & ~FD_CLOEXEC)
+          break;
+
+        if (DosQueryFHState (fd, &ulMode))
+          break;
+
+        if (arg & FD_CLOEXEC)
+          ulMode |= OPEN_FLAGS_NOINHERIT;
+        else
+          ulMode &= ~OPEN_FLAGS_NOINHERIT;
+
+        /* Filter supported flags.  */
+        ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
+                   | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
+
+        if (DosSetFHState (fd, ulMode))
+          break;
+
+        result = 0;
+        break;
+
+      case F_GETFL:
+        result = 0;
+        break;
+
+      case F_SETFL:
+        if (arg != 0)
+          break;
+
+        result = 0;
+        break;
+
+      default :
+        errno = EINVAL;
+        break;
+      }
+  }
+
+  va_end (arg_ptr);
+
+  return result;
+}
+
+# define fcntl klibc_fcntl
+#endif
+
 /* Perform the specified ACTION on the file descriptor FD, possibly
    using the argument ARG further described below.  This replacement
    handles the following actions, and forwards all others on to the
diff --git a/lib/fdopendir.c b/lib/fdopendir.c
index f30ab24..c1f4dcb 100644
--- a/lib/fdopendir.c
+++ b/lib/fdopendir.c
@@ -62,6 +62,41 @@ static DIR *fd_clone_opendir (int, struct saved_cwd const *);
    If this function returns successfully, FD is under control of the
    dirent.h system, and the caller should not close or modify the state of
    FD other than by the dirent.h functions.  */
+# ifdef __KLIBC__
+#  include <InnoTekLIBC/backend.h>
+
+DIR *
+fdopendir (int fd)
+{
+  char path[_MAX_PATH];
+  DIR *dirp;
+
+  /* Get a path from fd */
+  if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
+    return NULL;
+
+  dirp = opendir (path);
+  if (!dirp)
+    return NULL;
+
+  /* Unregister fd registered by opendir() */
+  _gl_unregister_dirp_fd (dirfd (dirp));
+
+  /* Register our fd */
+  if (_gl_register_dirp_fd (fd, dirp))
+    {
+      int saved_errno = errno;
+
+      closedir (dirp);
+
+      errno = saved_errno;
+
+      dirp = NULL;
+    }
+
+  return dirp;
+}
+# else
 DIR *
 fdopendir (int fd)
 {
@@ -84,6 +119,7 @@ fdopendir (int fd)
 
   return dir;
 }
+# endif
 
 /* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known
    to be a dup of FD which is less than FD - 1 and which will be
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index 8c70df1..bf40dad 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -102,7 +102,7 @@ get_permissions (const char *name, int desc, mode_t mode,
      There is an API
        pathconf (name, _PC_ACL_ENABLED)
        fpathconf (desc, _PC_ACL_ENABLED)
-     that allows to determine which of the two kinds of ACLs is supported
+     that allows us to determine which of the two kinds of ACLs is supported
      for the given file.  But some file systems may implement this call
      incorrectly, so better not use it.
      When fetching the source ACL, we simply fetch both ACL types.
diff --git a/lib/mktime.c b/lib/mktime.c
index adbf8d4..c9738d0 100644
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -19,7 +19,7 @@
 
 /* Define this to have a standalone program to test this implementation of
    mktime.  */
-/* #define DEBUG 1 */
+/* #define DEBUG_MKTIME 1 */
 
 #ifndef _LIBC
 # include <config.h>
@@ -38,13 +38,13 @@
 
 #include <string.h>            /* For the real memcpy prototype.  */
 
-#if defined DEBUG && DEBUG
+#if defined DEBUG_MKTIME && DEBUG_MKTIME
 # include <stdio.h>
 # include <stdlib.h>
 /* Make it work even if the system's libc has its own mktime routine.  */
 # undef mktime
 # define mktime my_mktime
-#endif /* DEBUG */
+#endif /* DEBUG_MKTIME */
 
 /* Some of the code in this file assumes that signed integer overflow
    silently wraps around.  This assumption can't easily be programmed
@@ -600,7 +600,7 @@ libc_hidden_def (mktime)
 libc_hidden_weak (timelocal)
 #endif
 
-#if defined DEBUG && DEBUG
+#if defined DEBUG_MKTIME && DEBUG_MKTIME
 
 static int
 not_equal_tm (const struct tm *a, const struct tm *b)
@@ -732,10 +732,10 @@ main (int argc, char **argv)
   return status;
 }
 
-#endif /* DEBUG */
+#endif /* DEBUG_MKTIME */
 
 /*
 Local Variables:
-compile-command: "gcc -DDEBUG -I. -Wall -W -O2 -g mktime.c -o mktime"
+compile-command: "gcc -DDEBUG_MKTIME -I. -Wall -W -O2 -g mktime.c -o mktime"
 End:
 */
diff --git a/lib/openat-proc.c b/lib/openat-proc.c
index 15a8c79..1712340 100644
--- a/lib/openat-proc.c
+++ b/lib/openat-proc.c
@@ -30,24 +30,21 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "intprops.h"
-
-#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s"
-
-#define PROC_SELF_FD_NAME_SIZE_BOUND(len) \
-  (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \
-   + INT_STRLEN_BOUND (int) + (len) + 1)
+#ifdef __KLIBC__
+# include <InnoTekLIBC/backend.h>
+#endif
 
+#include "intprops.h"
 
-/* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE
-   respectively for %d and %s.  If successful, return BUF if the
-   result fits in BUF, dynamically allocated memory otherwise.  But
-   return NULL if /proc is not reliable, either because the operating
-   system support is lacking or because memory is low.  */
+/* Set BUF to the name of the subfile of the directory identified by
+   FD, where the subfile is named FILE.  If successful, return BUF if
+   the result fits in BUF, dynamically allocated memory otherwise.
+   Return NULL (setting errno) on error.  */
 char *
 openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
 {
-  static int proc_status = 0;
+  char *result = buf;
+  int dirlen;
 
   /* Make sure the caller gets ENOENT when appropriate.  */
   if (!*file)
@@ -56,47 +53,82 @@ openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, 
char const *file)
       return buf;
     }
 
-  if (! proc_status)
-    {
-      /* Set PROC_STATUS to a positive value if /proc/self/fd is
-         reliable, and a negative value otherwise.  Solaris 10
-         /proc/self/fd mishandles "..", and any file name might expand
-         to ".." after symbolic link expansion, so avoid /proc/self/fd
-         if it mishandles "..".  Solaris 10 has openat, but this
-         problem is exhibited on code that built on Solaris 8 and
-         running on Solaris 10.  */
-
-      int proc_self_fd = open ("/proc/self/fd",
-                               O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
-      if (proc_self_fd < 0)
-        proc_status = -1;
-      else
-        {
-          /* Detect whether /proc/self/fd/%i/../fd exists, where %i is the
-             number of a file descriptor open on /proc/self/fd.  On Linux,
-             that name resolves to /proc/self/fd, which was opened above.
-             However, on Solaris, it may resolve to /proc/self/fd/fd, which
-             cannot exist, since all names in /proc/self/fd are numeric.  */
-          char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof "../fd" - 1)];
-          sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "../fd");
-          proc_status = access (dotdot_buf, F_OK) ? -1 : 1;
-          close (proc_self_fd);
-        }
-    }
-
-  if (proc_status < 0)
-    return NULL;
-  else
-    {
-      size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file));
-      char *result = buf;
-      if (OPENAT_BUFFER_SIZE < bufsize)
-        {
-          result = malloc (bufsize);
-          if (! result)
-            return NULL;
-        }
-      sprintf (result, PROC_SELF_FD_FORMAT, fd, file);
-      return result;
-    }
+#ifndef __KLIBC__
+# define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/"
+  {
+    enum {
+      PROC_SELF_FD_DIR_SIZE_BOUND
+        = (sizeof PROC_SELF_FD_FORMAT - (sizeof "%d" - 1)
+           + INT_STRLEN_BOUND (int))
+    };
+
+    static int proc_status = 0;
+    if (! proc_status)
+      {
+        /* Set PROC_STATUS to a positive value if /proc/self/fd is
+           reliable, and a negative value otherwise.  Solaris 10
+           /proc/self/fd mishandles "..", and any file name might expand
+           to ".." after symbolic link expansion, so avoid /proc/self/fd
+           if it mishandles "..".  Solaris 10 has openat, but this
+           problem is exhibited on code that built on Solaris 8 and
+           running on Solaris 10.  */
+
+        int proc_self_fd = open ("/proc/self/fd",
+                                 O_SEARCH | O_DIRECTORY | O_NOCTTY | 
O_NONBLOCK);
+        if (proc_self_fd < 0)
+          proc_status = -1;
+        else
+          {
+            /* Detect whether /proc/self/fd/%i/../fd exists, where %i is the
+               number of a file descriptor open on /proc/self/fd.  On Linux,
+               that name resolves to /proc/self/fd, which was opened above.
+               However, on Solaris, it may resolve to /proc/self/fd/fd, which
+               cannot exist, since all names in /proc/self/fd are numeric.  */
+            char dotdot_buf[PROC_SELF_FD_DIR_SIZE_BOUND + sizeof "../fd" - 1];
+            sprintf (dotdot_buf, PROC_SELF_FD_FORMAT "../fd", proc_self_fd);
+            proc_status = access (dotdot_buf, F_OK) ? -1 : 1;
+            close (proc_self_fd);
+          }
+      }
+
+    if (proc_status < 0)
+      return NULL;
+    else
+      {
+        size_t bufsize = PROC_SELF_FD_DIR_SIZE_BOUND + strlen (file);
+        if (OPENAT_BUFFER_SIZE < bufsize)
+          {
+            result = malloc (bufsize);
+            if (! result)
+              return NULL;
+          }
+
+        dirlen = sprintf (result, PROC_SELF_FD_FORMAT, fd);
+      }
+  }
+#else
+  /* OS/2 kLIBC provides a function to retrieve a path from a fd.  */
+  {
+    char dir[_MAX_PATH];
+    size_t bufsize;
+
+    if (__libc_Back_ioFHToPath (fd, dir, sizeof dir))
+      return NULL;
+
+    dirlen = strlen (dir);
+    bufsize = dirlen + 1 + strlen (file) + 1; /* 1 for '/', 1 for null */
+    if (OPENAT_BUFFER_SIZE < bufsize)
+      {
+        result = malloc (bufsize);
+        if (! result)
+          return NULL;
+      }
+
+    strcpy (result, dir);
+    result[dirlen++] = '/';
+  }
+#endif
+
+  strcpy (result + dirlen, file);
+  return result;
 }
diff --git a/lib/sig2str.h b/lib/sig2str.h
index f347170..2730774 100644
--- a/lib/sig2str.h
+++ b/lib/sig2str.h
@@ -44,6 +44,8 @@ int str2sig (char const *, int *);
 
 #if defined _sys_nsig
 # define SIGNUM_BOUND (_sys_nsig - 1)
+#elif defined _SIG_MAXSIG
+# define SIGNUM_BOUND (_SIG_MAXSIG - 2) /* FreeBSD >= 7.  */
 #elif defined NSIG
 # define SIGNUM_BOUND (NSIG - 1)
 #else
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index d241391..0bb9ad4 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -288,12 +288,17 @@ typedef gl_uint_fast32_t gl_uint_fast16_t;
 
 /* 7.18.1.4. Integer types capable of holding object pointers */
 
+/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+   definitions of intptr_t and uintptr_t (which use int and unsigned)
+   to avoid clashes with declarations of system functions like sbrk.  */
+#ifndef _INTPTR_T_DECLARED
 #undef intptr_t
 #undef uintptr_t
 typedef long int gl_intptr_t;
 typedef unsigned long int gl_uintptr_t;
 #define intptr_t gl_intptr_t
 #define uintptr_t gl_uintptr_t
+#endif
 
 /* 7.18.1.5. Greatest-width integer types */
 
diff --git a/lib/strftime.c b/lib/strftime.c
index 10d3eb4..4e65190 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -641,7 +641,7 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
           break;
         }
 
-      /* As a GNU extension we allow to specify the field width.  */
+      /* As a GNU extension we allow the field width to be specified.  */
       if (ISDIGIT (*f))
         {
           width = 0;
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17
index ee812bd..1785a33 100644
--- a/lisp/ChangeLog.17
+++ b/lisp/ChangeLog.17
@@ -4437,7 +4437,7 @@
 
 2014-12-07  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * net/eww.el (eww-follow-link): Revert prefix behaviour to
+       * net/eww.el (eww-follow-link): Revert prefix behavior to
        previous behavior.
        (eww-copy-page-url): Add doc string.
 
@@ -9140,7 +9140,7 @@
 2014-06-30  Grégoire Jadi  <address@hidden>
 
        * net/rcirc.el (rcirc-buffer-process): Restore previous
-       behaviour.  (Bug#17772)
+       behavior.  (Bug#17772)
 
 2014-06-29  Alan Mackenzie  <address@hidden>
 
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 5851a89..14e39bd 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -664,8 +664,8 @@ This is an internal function used by Auto-Revert Mode."
                  (not (eq revert 'fast)))
         (message "Reverting buffer `%s'." (buffer-name)))
       ;; If point (or a window point) is at the end of the buffer, we
-      ;; want to keep it at the end after reverting.  This allows to
-      ;; tail a file.
+      ;; want to keep it at the end after reverting.  This allows one
+      ;; to tail a file.
       (when buffer-file-name
         (setq eob (eobp))
         (walk-windows
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index ce36748..c7e6615 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -189,7 +189,7 @@ BINDINGS is a list of (VARIABLE . VALUE).
 Optional argument PLIST is a property list each VARIABLE symbol will
 be set to.  The following properties have special meaning:
 
-- `constant-flag' if non-nil, prevent to rebind variables.
+- `constant-flag' if non-nil, prevent rebinding variables.
 - `mode-variable-flag' if non-nil, define mode variables.
 - `override-flag' if non-nil, define override functions.
 
@@ -544,7 +544,7 @@ default is to call the function `NAME-default' with the 
appropriate
 arguments.
 
 BODY can also include an override form that specifies which part of
-BODY is specifically overridden.  This permits to specify common code
+BODY is specifically overridden.  This permits specifying common code
 run for both default and overridden implementations.
 An override form is one of:
 
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index a45077e..38abc9e 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -803,7 +803,7 @@ if available."
   (setq isearch-adjusted t)
   (isearch-update))
 
-;; Recent versions of GNU Emacs allow to override the isearch search
+;; Recent versions of GNU Emacs allow overriding the isearch search
 ;; function for special needs, and avoid to advice the built-in search
 ;; function :-)
 (defun senator-isearch-search-fun ()
diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el
index 2df4b2a..d0632f1 100644
--- a/lisp/cedet/semantic/wisent.el
+++ b/lisp/cedet/semantic/wisent.el
@@ -149,7 +149,7 @@ and will be collected in `semantic-lex' form: (SYMBOL START 
. END)."
 
 ;; Parser plug-ins
 ;;
-;; The following functions permit to plug the Wisent LALR parser in
+;; The following functions permit plugging the Wisent LALR parser in
 ;; Semantic toolkit.  They use the standard API provided by Semantic
 ;; to plug parsers in.
 ;;
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index 0ce2b23..7188ae0 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -98,7 +98,7 @@ sure to obey the 8.3 limitations."
                            string))
              (aset string i ?_))
            ;; If we don't have a period in the first 8 chars, insert one.
-           ;; This enables to have 3 more characters from the original
+           ;; This enables having 3 more characters from the original
            ;; name in the extension.
            (if (> (or (string-match "\\." string) (length string))
                   8)
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index f4be947..7a914da 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -2128,12 +2128,12 @@ To be used in the ERT results buffer."
   "Move point from NODE to the previous or next node.
 
 EWOC-FN specifies the direction and should be either `ewoc-prev'
-or `ewoc-next'.  If there are no more nodes in that direction, an
-error is signaled with the message ERROR-MESSAGE."
+or `ewoc-next'.  If there are no more nodes in that direction, a
+user-error is signaled with the message ERROR-MESSAGE."
   (cl-loop
    (setq node (funcall ewoc-fn ert--results-ewoc node))
    (when (null node)
-     (error "%s" error-message))
+     (user-error "%s" error-message))
    (unless (ert--ewoc-entry-hidden-p (ewoc-data node))
      (goto-char (ewoc-location node))
      (cl-return))))
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 549ee96..7be997e 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -117,7 +117,7 @@ two element list, binding its elements to symbols named 
`foo' and
 
 A significant difference from `cl-destructuring-bind' is that, if
 a pattern match fails, the next case is tried until either a
-succesful match is found or there are no more cases.
+successful match is found or there are no more cases.
 
 Another difference is that pattern elements may be backquoted,
 meaning they must match exactly: The pattern \\='(foo bar)
diff --git a/lisp/emacs-lisp/tabulated-list.el 
b/lisp/emacs-lisp/tabulated-list.el
index 68658d2..00b029d 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -571,7 +571,6 @@ data in an ewoc may instead specify a printer function 
(e.g., one
 that calls `ewoc-enter-last'), with `tabulated-list-print-entry'
 as the ewoc pretty-printer."
   (setq-local truncate-lines t)
-  (setq-local buffer-read-only t)
   (setq-local buffer-undo-list t)
   (setq-local revert-buffer-function #'tabulated-list-revert)
   (setq-local glyphless-char-display tabulated-list-glyphless-char-display)
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 2e1a728..05ad7f5 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -429,23 +429,24 @@ from the MODE alist ignoring the input argument VALUE."
   (catch 'exit
     (unless enable-local-variables
       (throw 'exit (message "Directory-local variables are disabled")))
-    (let ((variables-file (and (buffer-file-name)
-                               (not (file-remote-p (buffer-file-name)))
-                               (dir-locals-find-file (buffer-file-name))))
-         variables)
-      (setq variables-file
+    (let* ((dir-or-cache (and (buffer-file-name)
+                              (not (file-remote-p (buffer-file-name)))
+                              (dir-locals-find-file (buffer-file-name))))
+           (variables-file
             ;; If there are several .dir-locals, the user probably
             ;; wants to edit the last one (the highest priority).
-            (cond ((stringp variables-file)
-                   (car (last (dir-locals--all-files variables-file))))
-                  ((consp variables-file)      ; result from cache
-                   ;; If cache element has an mtime, assume it came from a 
file.
-                   ;; Otherwise, assume it was set directly.
-                   (if (nth 2 variables-file)
-                       (car (last (dir-locals--all-files (car 
variables-file))))
-                     (cadr variables-file)))
+            (cond ((stringp dir-or-cache)
+                   (car (last (dir-locals--all-files dir-or-cache))))
+                  ((consp dir-or-cache)        ; result from cache
+                   ;; If cache element has an mtime, assume it came
+                   ;; from a file.  Otherwise, assume it was set
+                   ;; directly.
+                   (if (nth 2 dir-or-cache)
+                       (car (last (dir-locals--all-files (car dir-or-cache))))
+                     (cadr dir-or-cache)))
                   ;; Try to make a proper file-name.
-                  (t (concat dir-locals-file ".el"))))
+                  (t (expand-file-name dir-locals-file))))
+           variables)
       ;; I can't be bothered to handle this case right now.
       ;; Dir locals were set directly from a class.  You need to
       ;; directly modify the class in dir-locals-class-alist.
diff --git a/lisp/files.el b/lisp/files.el
index 5a15c71..92ae434 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3713,37 +3713,43 @@ VARIABLES list of the class.  The list is processed in 
order.
   applied by recursively following these rules."
   (setf (alist-get class dir-locals-class-alist) variables))
 
-(defconst dir-locals-file ".dir-locals"
-  "Pattern for files that contain directory-local variables.
+(defconst dir-locals-file ".dir-locals.el"
+  "File that contains directory-local variables.
 It has to be constant to enforce uniform values across different
 environments and users.
+See also `dir-locals-file-2', whose values override this one's.
+See Info node `(elisp)Directory Local Variables' for details.")
 
-Multiple dir-locals files in the same directory are loaded in
-`string<' order.
+(defconst dir-locals-file-2 ".dir-locals-2.el"
+  "File that contains directory-local variables.
+This essentially a second file that can be used like
+`dir-locals-file', so that users can have specify their personal
+dir-local variables even if the current directory already has a
+`dir-locals-file' that is shared with other users (such as in a
+git repository).
 See Info node `(elisp)Directory Local Variables' for details.")
 
-(defun dir-locals--all-files (file-or-dir)
-  "Return a list of all readable dir-locals files matching FILE-OR-DIR.
-If FILE-OR-DIR is a file pattern, expand wildcards in it and
-return a sorted list of the results.  If it is a directory name,
-return a sorted list of all files matching `dir-locals-file' in
-this directory.
-The returned list is sorted by `string<' order."
-  (require 'seq)
-  (let ((dir (if (file-directory-p file-or-dir)
-                 file-or-dir
-               (or (file-name-directory file-or-dir)
-                   default-directory)))
-        (file (cond ((not (file-directory-p file-or-dir)) 
(file-name-nondirectory file-or-dir))
-                    ((eq system-type 'ms-dos) (dosified-file-name 
dir-locals-file))
-                    (t dir-locals-file))))
-    (seq-filter (lambda (f) (and (file-readable-p f)
-                            (file-regular-p f)
-                            (not (file-directory-p f))))
-                (mapcar (lambda (f) (expand-file-name f dir))
-                        (nreverse
-                         (let ((completion-regexp-list '("\\.el\\'")))
-                           (file-name-all-completions file dir)))))))
+(defun dir-locals--all-files (directory)
+  "Return a list of all readable dir-locals files in DIRECTORY.
+The returned list is sorted by increasing priority.  That is,
+values specified in the last file should take precedence over
+those in the first."
+  (when (file-readable-p directory)
+    (let* ((file-1 (expand-file-name (if (eq system-type 'ms-dos)
+                                        (dosified-file-name dir-locals-file)
+                                      dir-locals-file)
+                                    directory))
+           (file-2 (when (string-match "\\.el\\'" file-1)
+                     (replace-match "-2.el" t nil file-1)))
+          (out nil))
+      ;; The order here is important.
+      (dolist (f (list file-2 file-1))
+        (when (and f
+                   (file-readable-p f)
+                   (file-regular-p f)
+                   (not (file-directory-p f)))
+          (push f out)))
+      out)))
 
 (defun dir-locals-find-file (file)
   "Find the directory-local variables for FILE.
@@ -3758,24 +3764,19 @@ A cache entry based on a `dir-locals-file' is valid if 
the modification
 time stored in the cache matches the current file modification time.
 If not, the cache entry is cleared so that the file will be re-read.
 
-This function returns either nil (no directory local variables found),
-or the matching entry from `dir-locals-directory-cache' (a list),
-or the full path to the `dir-locals-file' (a string) in the case
-of no valid cache entry.  If `dir-locals-file' contains
-wildcards, then the return value is not a proper filename, it is
-an absolute version of `dir-locals-file' which is guaranteed to
-expand to at least one file."
+This function returns either:
+  - nil (no directory local variables found),
+  - the matching entry from `dir-locals-directory-cache' (a list),
+  - or the full path to the directory (a string) containing at
+    least one `dir-locals-file' in the case of no valid cache
+    entry."
   (setq file (expand-file-name file))
   (let* ((locals-dir (locate-dominating-file (file-name-directory file)
                                              #'dir-locals--all-files))
-         locals-file dir-elt)
+         dir-elt)
     ;; `locate-dominating-file' may have abbreviated the name.
     (when locals-dir
-      (setq locals-dir (expand-file-name locals-dir))
-      (setq locals-file (expand-file-name (if (eq system-type 'ms-dos)
-                                              (dosified-file-name 
dir-locals-file)
-                                            dir-locals-file)
-                                          locals-dir)))
+      (setq locals-dir (expand-file-name locals-dir)))
     ;; Find the best cached value in `dir-locals-directory-cache'.
     (dolist (elt dir-locals-directory-cache)
       (when (and (string-prefix-p (car elt) file
@@ -3808,20 +3809,19 @@ expand to at least one file."
                 (delq dir-elt dir-locals-directory-cache))
           ;; Return the first existing dir-locals file.  Might be the same
           ;; as dir-elt's, might not (eg latter might have been deleted).
-          locals-file)
+          locals-dir)
       ;; No cache entry.
-      locals-file)))
-
-(defun dir-locals-read-from-file (file)
-  "Load a variables FILE and register a new class and instance.
-FILE is the absolute name of the file holding the variables to
-apply.  It may contain wildcards.
-The new class name is the same as the directory in which FILE
-is found.  Returns the new class name."
+      locals-dir)))
+
+(defun dir-locals-read-from-dir (dir)
+  "Load all variables files in DIR and register a new class and instance.
+DIR is the absolute name of a directory which must contain at
+least one dir-local file (which is a file holding variables to
+apply).
+Return the new class name, which is a symbol named DIR."
   (require 'map)
-  (let* ((dir-name (file-name-directory file))
-         (class-name (intern dir-name))
-         (files (dir-locals--all-files file))
+  (let* ((class-name (intern dir))
+         (files (dir-locals--all-files dir))
          (read-circle nil)
          (success nil)
          (variables))
@@ -3838,7 +3838,7 @@ is found.  Returns the new class name."
       (setq success t))
     (dir-locals-set-class-variables class-name variables)
     (dir-locals-set-directory-class
-     dir-name class-name
+     dir class-name
      (seconds-to-time
       (if success
           (apply #'max (mapcar (lambda (file)
@@ -3849,6 +3849,9 @@ is found.  Returns the new class name."
         0)))
     class-name))
 
+(define-obsolete-function-alias 'dir-locals-read-from-file
+  'dir-locals-read-from-dir "25.1")
+
 (defcustom enable-remote-dir-locals nil
   "Non-nil means dir-local variables will be applied to remote files."
   :version "24.3"
@@ -3870,17 +3873,17 @@ This does nothing if either `enable-local-variables' or
                 (not (file-remote-p (or (buffer-file-name)
                                         default-directory)))))
     ;; Find the variables file.
-    (let ((file-pattern-or-cache (dir-locals-find-file
-                                  (or (buffer-file-name) default-directory)))
+    (let ((dir-or-cache (dir-locals-find-file
+                         (or (buffer-file-name) default-directory)))
          (class nil)
          (dir-name nil))
       (cond
-       ((stringp file-pattern-or-cache)
-       (setq dir-name (file-name-directory file-pattern-or-cache)
-             class (dir-locals-read-from-file file-pattern-or-cache)))
-       ((consp file-pattern-or-cache)
-       (setq dir-name (nth 0 file-pattern-or-cache))
-       (setq class (nth 1 file-pattern-or-cache))))
+       ((stringp dir-or-cache)
+       (setq dir-name dir-or-cache
+             class (dir-locals-read-from-dir dir-or-cache)))
+       ((consp dir-or-cache)
+       (setq dir-name (nth 0 dir-or-cache))
+       (setq class (nth 1 dir-or-cache))))
       (when class
        (let ((variables
               (dir-locals-collect-variables
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 988bf7b..471db6b 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1074,7 +1074,13 @@ accessible portion of the current buffer."
 
 (defvar font-lock-ensure-function
   (lambda (_beg _end)
-    (unless font-lock-fontified (font-lock-default-fontify-buffer)))
+    (unless font-lock-fontified
+      (font-lock-default-fontify-buffer)
+      (unless font-lock-mode
+        ;; If font-lock is not enabled, we don't have the hooks in place to
+        ;; track modifications, so a subsequent call to font-lock-ensure can't
+        ;; assume that the fontification is still valid.
+        (setq font-lock-fontified nil))))
   "Function to make sure a region has been fontified.
 Called with two arguments BEG and END.")
 
diff --git a/lisp/frameset.el b/lisp/frameset.el
index b8d86c6..2453f57 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -354,12 +354,12 @@ Properties can be set with
 ;; Now, what about the filter alist variables? There are three of them,
 ;; though only two sets of parameters:
 ;;
-;; - `frameset-session-filter-alist' contains these filters that allow to
-;;   save and restore framesets in-session, without the need to serialize
-;;   the frameset or save it to disk (for example, to save a frameset in a
-;;   register and restore it later).  Filters in this list do not remove
-;;   live objects, except in `minibuffer', which is dealt especially by
-;;   `frameset-save' / `frameset-restore'.
+;; - `frameset-session-filter-alist' contains these filters that allow
+;;   saving and restoring framesets in-session, without the need to
+;;   serialize the frameset or save it to disk (for example, to save a
+;;   frameset in a register and restore it later).  Filters in this
+;;   list do not remove live objects, except in `minibuffer', which is
+;;   dealt especially by `frameset-save' / `frameset-restore'.
 ;;
 ;; - `frameset-persistent-filter-alist' is the whole deal.  It does all
 ;;   the filtering described above, and the result is ready to be saved on
@@ -1072,7 +1072,7 @@ FORCE-ONSCREEN can be:
           - a list (LEFT TOP WIDTH HEIGHT), describing the workarea.
           It must return non-nil to force the frame onscreen, nil otherwise.
 
-CLEANUP-FRAMES allows to \"clean up\" the frame list after restoring a 
frameset:
+CLEANUP-FRAMES allows \"cleaning up\" the frame list after restoring a 
frameset:
   t        Delete all frames that were not created or restored upon.
   nil      Keep all frames.
   FUNC     A function called with two arguments:
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 9219ce0..80753c1 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -680,7 +680,7 @@ minor mode in all Gnus buffers."
 
 (defun gnus-agent-queue-setup (&optional group-name)
   "Make sure the queue group exists.
-Optional arg GROUP-NAME allows to specify another group."
+Optional arg GROUP-NAME allows another group to be specified."
   (unless (gnus-gethash (format "nndraft:%s" (or group-name "queue"))
                        gnus-newsrc-hashtb)
     (gnus-request-create-group (or group-name "queue") '(nndraft ""))
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 11ce04f..54bbfd8 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1659,7 +1659,9 @@ called with the group name as the parameter, and should 
return a
 regexp."
   :version "24.1"
   :group 'gnus-art
-  :type '(choice regexp function))
+  :type '(choice (const :tag "Allow all" nil)
+                 (regexp :tag "Regular expression")
+                 (function :tag "Use a function")))
 
 ;;; Internal variables
 
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index fb97479..106d010 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -496,9 +496,9 @@ Unless LIST is given, `mm-codepage-ibm-list' is used."
       (windows-1257 . (mm-codepage-setup 1257 t))))
   "An alist of (CHARSET . FORM) pairs.
 If an article is encoded in an unknown CHARSET, FORM is
-evaluated.  This allows to load additional libraries providing
-charsets on demand.  If supported by your Emacs version, you
-could use `autoload-coding-system' here."
+evaluated.  This allows the loading of additional libraries
+providing charsets on demand.  If supported by your Emacs
+version, you could use `autoload-coding-system' here."
   :version "22.1" ;; Gnus 5.10.9
   :type '(list (set :inline t
                    (const (windows-1250 . (mm-codepage-setup 1250 t)))
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 2e94733..a43c0f6 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -496,7 +496,7 @@ with L, LRE, or LRO Unicode bidi character type.")
                    table)))
 
 ;; Load uni-mirrored.el and uni-brackets.el if available, so that they
-;; get dumped into Emacs.  This allows to start Emacs with
+;; get dumped into Emacs.  This allows starting Emacs with
 ;; force-load-messages in ~/.emacs, and avoid infinite recursion in
 ;; bidi_initialize, which needs to load uni-mirrored.el and
 ;; uni-brackets.el in order to display the "Loading" messages.
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index f0c65fa..7b46822 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -11624,7 +11624,7 @@ FORCE-ONSCREEN can be:
           - a list (LEFT TOP WIDTH HEIGHT), describing the workarea.
           It must return non-nil to force the frame onscreen, nil otherwise.
 
-CLEANUP-FRAMES allows to \"clean up\" the frame list after restoring a 
frameset:
+CLEANUP-FRAMES allows \"cleaning up\" the frame list after restoring a 
frameset:
   t        Delete all frames that were not created or restored upon.
   nil      Keep all frames.
   FUNC     A function called with two arguments:
@@ -30597,8 +30597,8 @@ Usage:
     according to option `vhdl-argument-list-indent'.
 
       If option `vhdl-indent-tabs-mode' is nil, spaces are used instead of
-    tabs.  `\\[tabify]' and `\\[untabify]' allow to convert spaces to tabs
-    and vice versa.
+    tabs.  `\\[tabify]' and `\\[untabify]' allow the conversion of spaces to
+    tabs and vice versa.
 
       Syntax-based indentation can be very slow in large files.  Option
     `vhdl-indent-syntax-based' allows you to use faster but simpler 
indentation.
diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el
index bfd6e7d..eb1305a 100644
--- a/lisp/mail/mailclient.el
+++ b/lisp/mail/mailclient.el
@@ -22,7 +22,7 @@
 
 ;;; Commentary:
 
-;; This package allows to hand over a buffer to be sent off
+;; This package allows handing over a buffer to be sent off
 ;; via the system's designated e-mail client.
 ;; Note that the e-mail client will display the contents of the buffer
 ;; again for editing.
diff --git a/lisp/man.el b/lisp/man.el
index 40b77e6..04a7fc3 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -75,7 +75,7 @@
 ;; ============= TODO ===========
 ;; - Add a command for printing.
 ;; - The awk script deletes multiple blank lines.  This behavior does
-;;   not allow to understand if there was indeed a blank line at the
+;;   not allow one to understand if there was indeed a blank line at the
 ;;   end or beginning of a page (after the header, or before the
 ;;   footer).  A different algorithm should be used.  It is easy to
 ;;   compute how many blank lines there are before and after the page
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 30b3891..6e60744 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -1262,7 +1262,7 @@ is used to search."
     (forward-line)))
 
 ;; All implementations of pick have special options -cc, -date, -from and
-;; -subject that allow to search for corresponding components. Any other
+;; -subject that allow searching for corresponding components. Any other
 ;; component is searched using option --COMPNAME, for example: `pick
 ;; --x-mailer mh-e'. Mailutils "pick" supports this option using a certain
 ;; kludge, but it prefers the following syntax for this purpose:
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index edf91ab..1a666e0 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -148,7 +148,7 @@ regexp should probably be \".\" to specify a default 
browser."
          (function-item :tag "eww" :value  eww-browse-url)
          (function-item :tag "Mozilla" :value  browse-url-mozilla)
          (function-item :tag "Firefox" :value browse-url-firefox)
-          (function-item :tag "Google Chrome" :value browse-url-chrome)
+         (function-item :tag "Google Chrome" :value browse-url-chrome)
          (function-item :tag "Chromium" :value browse-url-chromium)
          (function-item :tag "Epiphany" :value  browse-url-epiphany)
          (function-item :tag "Conkeror" :value  browse-url-conkeror)
@@ -266,15 +266,15 @@ Defaults to the value of `browse-url-firefox-arguments' 
at the time
     (while (and candidates (not (executable-find (car candidates))))
       (setq candidates (cdr candidates)))
     (or (car candidates) "chromium"))
-  "The name by which to invoke Chromium."
+  "The name by which to invoke the Chrome browser."
   :type 'string
-  :version "24.1"
+  :version "25.1"
   :group 'browse-url)
 
 (defcustom browse-url-chrome-arguments nil
   "A list of strings to pass to Google Chrome as arguments."
   :type '(repeat (string :tag "Argument"))
-  :version "24.1"
+  :version "25.1"
   :group 'browse-url)
 
 (defcustom browse-url-chromium-program
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index ebdeecc..ee8b55b 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -87,7 +87,7 @@ against previous connections.  If the function determines that
 there is something odd about the connection, the user will be
 queried about what to do about it.
 
-The process it returned if everything is OK, and otherwise, the
+The process is returned if everything is OK, and otherwise, the
 process will be deleted and nil is returned.
 
 If SAVE-FINGERPRINT, always save the fingerprint of the
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 5e9af0b..856011f 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -209,7 +209,7 @@ Before reproducing the bug, you might apply
 
   M-x tramp-cleanup-all-connections
 
-This allows to investigate from a clean environment.  Another
+This allows us to investigate from a clean environment.  Another
 useful thing to do is to put
 
   (setq tramp-verbose 9)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 46bf3de..796a5d3 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -86,7 +86,7 @@
 
 ;; Restrictions:
 
-;; * The current GVFS implementation does not allow to write on the
+;; * The current GVFS implementation does not allow writing on the
 ;;   remote bluetooth device via OBEX.
 ;;
 ;; * Two shares of the same SMB server cannot be mounted in parallel.
diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1
index 57a427c..ccc849d 100644
--- a/lisp/org/ChangeLog.1
+++ b/lisp/org/ChangeLog.1
@@ -32528,7 +32528,7 @@
        (org-export-normalize-links)
        (org-export-concatenate-multiline-links)
        (org-export-concatenate-multiline-emphasis): New functions,
-       obtained from spliting the export preprocessor.
+       obtained from splitting the export preprocessor.
 
        * org-table.el (org-table-recalculate): Improve error message if
        the row number is invalid.
diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el
index 22b02c8..8abe32b 100644
--- a/lisp/org/org-crypt.el
+++ b/lisp/org/org-crypt.el
@@ -225,7 +225,7 @@ See `org-crypt-disable-auto-save'."
            ;; outline property starts at the \n of the heading.
            (delete-region (1- (point)) end)
            ;; Store a checksum of the decrypted and the encrypted
-           ;; text value.  This allow to reuse the same encrypted text
+           ;; text value.  This allow reusing the same encrypted text
            ;; if the text does not change, and therefore avoid a
            ;; re-encryption process.
            (insert "\n" (propertize decrypted-text
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index e47d65f..a19f52c 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -367,8 +367,8 @@ still has an entry since one of its properties (`:title') 
does.")
 ;; Provide four accessors: `org-element-type', `org-element-property'
 ;; `org-element-contents' and `org-element-restriction'.
 ;;
-;; Setter functions allow to modify elements by side effect.  There is
-;; `org-element-put-property', `org-element-set-contents',
+;; Setter functions allow modification of elements by side effect.
+;; There is `org-element-put-property', `org-element-set-contents',
 ;; `org-element-set-element' and `org-element-adopt-element'.  Note
 ;; that `org-element-set-element' and `org-element-adopt-elements' are
 ;; higher level functions since also update `:parent' property.
@@ -487,7 +487,7 @@ Return parent element."
 ;; cannot contain other greater elements of their own type.
 ;;
 ;; Beside implementing a parser and an interpreter, adding a new
-;; greater element requires to tweak `org-element--current-element'.
+;; greater element requires tweaking `org-element--current-element'.
 ;; Moreover, the newly defined type must be added to both
 ;; `org-element-all-elements' and `org-element-greater-elements'.
 
@@ -4023,8 +4023,8 @@ position of point and CDR is nil."
 ;; `org-element-parse-secondary-string', which parses objects within
 ;; a given string.
 ;;
-;; The (almost) almighty `org-element-map' allows to apply a function
-;; on elements or objects matching some type, and accumulate the
+;; The (almost) almighty `org-element-map' allows applying a function
+;; on elements or objects matching some type, and accumulating the
 ;; resulting values.  In an export situation, it also skips unneeded
 ;; parts of the parse tree.
 
diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el
index 2d71c8b..6d6f996 100644
--- a/lisp/org/org-feed.el
+++ b/lisp/org/org-feed.el
@@ -24,7 +24,7 @@
 ;;
 ;;; Commentary:
 ;;
-;;  This module allows to create and change entries in an Org-mode
+;;  This module allows entries to be created and changed in an Org-mode
 ;;  file triggered by items in an RSS feed.  The basic functionality is
 ;;  geared toward simply adding new items found in a feed as outline nodes
 ;;  to an Org file.  Using hooks, arbitrary actions can be triggered for
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el
index b11f444..f535390 100644
--- a/lisp/org/org-mobile.el
+++ b/lisp/org/org-mobile.el
@@ -88,7 +88,7 @@ org-agenda-text-search-extra-files
 Encryption uses AES-256, with a password given in
 `org-mobile-encryption-password'.
 When nil, plain files are kept on the server.
-Turning on encryption requires to set the same password in the MobileOrg
+Turning on encryption requires setting the same password in the MobileOrg
 application.  Before turning this on, check of MobileOrg does already
 support it - at the time of this writing it did not yet."
   :group 'org-mobile
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 960b874..6e7d54d 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -2254,7 +2254,7 @@ fast, while still showing the whole path to the entry."
   :type 'boolean)
 
 (defcustom org-refile-allow-creating-parent-nodes nil
-  "Non-nil means allow to create new nodes as refile targets.
+  "Non-nil means allow the creation of new nodes as refile targets.
 New nodes are then created by adding \"/new node name\" to the completion
 of an existing node.  When the value of this variable is `confirm',
 new node creation must be confirmed by the user (recommended).
diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el
index 1907dc0..dcca608 100644
--- a/lisp/org/ox-ascii.el
+++ b/lisp/org/ox-ascii.el
@@ -35,10 +35,10 @@
 
 ;;; Define Back-End
 ;;
-;; The following setting won't allow to modify preferred charset
+;; The following setting won't allow modifying preferred charset
 ;; through a buffer keyword or an option item, but, since the property
-;; will appear in communication channel nonetheless, it allows to
-;; override `org-ascii-charset' variable on the fly by the ext-plist
+;; will appear in communication channel nonetheless, it allows
+;; overriding `org-ascii-charset' variable on the fly by the ext-plist
 ;; mechanism.
 ;;
 ;; We also install a filter for headlines and sections, in order to
diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el
index 4448067..0d34ba1 100644
--- a/lisp/org/ox-icalendar.el
+++ b/lisp/org/ox-icalendar.el
@@ -76,7 +76,7 @@ for timed events.  If non-zero, alarms are created.
 
 (defcustom org-icalendar-exclude-tags nil
   "Tags that exclude a tree from export.
-This variable allows to specify different exclude tags from other
+This variable allows specifying different exclude tags from other
 back-ends.  It can also be set with the ICAL_EXCLUDE_TAGS
 keyword."
   :group 'org-export-icalendar
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el
index ec33bbd..38fdce1 100644
--- a/lisp/org/ox-publish.el
+++ b/lisp/org/ox-publish.el
@@ -1078,7 +1078,7 @@ publishing directory."
   "Return numbering for headline matching FUZZY search in FILE.
 
 Return value is a list of numbers, or nil.  This function allows
-to resolve external fuzzy links like:
+the resolution of external fuzzy links like:
 
   [[file.org::*fuzzy][description]]"
   (when org-publish-cache
diff --git a/lisp/org/ox.el b/lisp/org/ox.el
index cc5a2d2..89d7973 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -775,7 +775,7 @@ is nil.  You can also allow them through local buffer 
variables."
 (defcustom org-export-snippet-translation-alist nil
   "Alist between export snippets back-ends and exporter back-ends.
 
-This variable allows to provide shortcuts for export snippets.
+This variable allows providing shortcuts for export snippets.
 
 For example, with a value of \((\"h\" . \"html\")), the
 HTML back-end will recognize the contents of \"@@h:<b>@@\" as
@@ -849,7 +849,7 @@ output is restricted to body only, \"s\" when it is 
restricted to
 the current subtree, \"v\" when only visible elements are
 considered for export, \"f\" when publishing functions should be
 passed the FORCE argument and \"a\" when the export should be
-asynchronous).  Also, [?] allows to switch back to standard
+asynchronous).  Also, [?] allows switching back to standard
 mode."
   :group 'org-export-general
   :version "24.4"
@@ -3657,9 +3657,9 @@ INFO is the plist used as a communication channel."
 ;; `org-export-get-relative-level' is a shortcut to get headline
 ;; level, relatively to the lower headline level in the parsed tree.
 ;;
-;; `org-export-get-headline-number' returns the section number of an
-;; headline, while `org-export-number-to-roman' allows to convert it
-;; to roman numbers.
+;; `org-export-get-headline-number' returns the section number of a
+;; headline, while `org-export-number-to-roman' allows it to be
+;; converted to roman numbers.
 ;;
 ;; `org-export-low-level-p', `org-export-first-sibling-p' and
 ;; `org-export-last-sibling-p' are three useful predicates when it
@@ -4093,8 +4093,8 @@ Otherwise, only provided element's type is considered.
 Optional argument PREDICATE is a function returning a non-nil
 value if the current element or object should be counted in.  It
 accepts two arguments: the element or object being considered and
-the plist used as a communication channel.  This allows to count
-only a certain type of objects (i.e. inline images).
+the plist used as a communication channel.  This allows counting
+only a certain type of object (i.e. inline images).
 
 Return value is a list of numbers if ELEMENT is a headline or an
 item.  It is nil for keywords.  It represents the footnote number
@@ -5458,7 +5458,7 @@ to `:default' encoding. If it fails, return S."
 ;; returned results in the current process.
 ;;
 ;; At a higher level, `org-export-to-buffer' and `org-export-to-file'
-;; allow to export to a buffer or a file, asynchronously or not.
+;; allow exporting to a buffer or a file, asynchronously or not.
 ;;
 ;; `org-export-output-file-name' is an auxiliary function meant to be
 ;; used with `org-export-to-file'.  With a given extension, it tries
@@ -5985,7 +5985,7 @@ is nil when this menu hasn't been selected yet.
 
 EXPERTP, when non-nil, triggers expert UI.  In that case, no help
 buffer is provided, but indications about currently active
-options are given in the prompt.  Moreover, [?] allows to switch
+options are given in the prompt.  Moreover, [?] allows switching
 back to standard interface."
   (let* ((fontify-key
          (lambda (key &optional access-key)
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index 0a63644..2c557ba 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -379,7 +379,7 @@ static unsigned char gamegrid_bits[] = {
     (dotimes (i height)
       (insert line))
     ;; Adjust the height of the default face to the height of the
-    ;; images. Unlike XEmacs, Emacs doesn't allow to make the default
+    ;; images. Unlike XEmacs, Emacs doesn't allow making the default
     ;; face buffer-local; so we do this with an overlay.
     (when (eq gamegrid-display-mode 'glyph)
       (overlay-put (make-overlay (point-min) (point-max))
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index c1372fa..02ac240 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -551,7 +551,7 @@ that DVAL has been added on SQUARE."
 ;;;
 
 ;; Several variables are used to monitor a game, including a GAME-HISTORY (the
-;; list of all (SQUARE . PREVSCORE) played) that allows to take moves back
+;; list of all (SQUARE . PREVSCORE) played) that allows you to take moves back
 ;; (anti-updating the score table) and to compute the table from scratch in
 ;; case of an interruption.
 
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 20880a8..ee81add 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -537,8 +537,8 @@ corresponding kind, i.e., looks like \(OPTION-DEF...).
 Each OPTION-DEF looks like \(OPTION-NAME EXTRA-FN VALUE-SPEC...) which
 defines a file/grammar/rule/subrule option with name OPTION-NAME.  The
 OPTION-NAMEs are used for the creation of the \"Insert XXX Option\"
-submenus, see `antlr-options-use-submenus', and to allow to insert the
-option name with completion when using \\[antlr-insert-option].
+submenus, see `antlr-options-use-submenus', and to allow the insertion
+of the option name with completion when using \\[antlr-insert-option].
 
 If EXTRA-FN is a function, it is called at different phases of the
 insertion with arguments \(PHASE OPTION-NAME).  PHASE can have the
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 018805d..dc24809 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -8278,8 +8278,8 @@ comment at the start of cc-engine.el for more info."
             before-lparen after-rparen
             (here (point))
             (pp-count-out 20)  ; Max number of paren/brace constructs before
-                               ; we give up
-            ids              ; List of identifiers in the parenthesised list.
+                               ; we give up.
+            ids              ; List of identifiers in the parenthesized list.
             id-start after-prec-token decl-or-cast decl-res
             c-last-identifier-range identifier-ok)
        (narrow-to-region low-lim (or macro-end (point-max)))
@@ -8304,7 +8304,7 @@ comment at the start of cc-engine.el for more info."
        ;; {
        ;;
        ;; Additionally, for a knr list to be recognized:
-       ;; o - The identifier of each deeclarator up to and including the
+       ;; o - The identifier of each declarator up to and including the
        ;;   one "near" point must be contained in the arg list.
 
        (catch 'knr
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 271033b..a2a0df2 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -2100,7 +2100,7 @@ for \\[find-tag] (which see)."
   (etags--xref-find-definitions symbol t))
 
 (defun etags--xref-find-definitions (pattern &optional regexp?)
-  ;; This emulates the behaviour of `find-tag-in-order' but instead of
+  ;; This emulates the behavior of `find-tag-in-order' but instead of
   ;; returning one match at a time all matches are returned as list.
   ;; NOTE: find-tag-tag-order is typically a buffer-local variable.
   (let* ((xrefs '())
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index a8c65fa..01f7f25 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2737,7 +2737,7 @@ killed."
                  (process (get-buffer-process buffer))
                  ;; Users can override the interpreter and args
                  ;; interactively when calling `run-python', let-binding
-                 ;; these allows to have the new right values in all
+                 ;; these allows having the new right values in all
                  ;; setup code that is done in `inferior-python-mode',
                  ;; which is important, especially for prompt detection.
                  (python-shell--interpreter interpreter)
@@ -3351,7 +3351,7 @@ def __PYTHON_EL_native_completion_setup():
                 if not completion:
                     if self.last_completion != '1__dummy_completion__':
                         # When no more completions are available, returning a
-                        # dummy with non-sharing prefix allow to ensure output
+                        # dummy with non-sharing prefix allow ensuring output
                         # while preventing changes to current input.
                         # Coincidentally it's also the end of output.
                         completion = '1__dummy_completion__'
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index d20a6b2..b176e64 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -4422,8 +4422,8 @@ Usage:
     according to option `vhdl-argument-list-indent'.
 
       If option `vhdl-indent-tabs-mode' is nil, spaces are used instead of
-    tabs.  `\\[tabify]' and `\\[untabify]' allow to convert spaces to tabs
-    and vice versa.
+    tabs.  `\\[tabify]' and `\\[untabify]' allow the conversion of spaces to
+    tabs and vice versa.
 
       Syntax-based indentation can be very slow in large files.  Option
     `vhdl-indent-syntax-based' allows you to use faster but simpler 
indentation.
diff --git a/lisp/simple.el b/lisp/simple.el
index ed4ca91..72e87a4 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2894,7 +2894,7 @@ removes the previous `undo-boundary' if a series of such 
calls
 have been made.  By default `self-insert-command' and
 `delete-char' are the only amalgamating commands, although this
 function could be called by any command wishing to have this
-behaviour."
+behavior."
   (let ((last-amalgamating-count
          (undo-auto--last-boundary-amalgamating-number)))
     (setq undo-auto--this-command-amalgamating t)
diff --git a/lisp/strokes.el b/lisp/strokes.el
index 8bdabc9..5a2020d 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -858,7 +858,7 @@ The command will be executed provided one exists for that 
stroke,
 based on the variable `strokes-minimum-match-score'.
 If no stroke matches, nothing is done and return value is nil."
   ;; FIXME: Undocument return value.  It is not documented for all cases,
-  ;; and doesn't allow to difference between no stroke matches and
+  ;; and doesn't allow differentiating between no stroke matches and
   ;; command-execute returning nil, anyway.
   (let* ((match (strokes-match-stroke stroke strokes-global-map))
         (command (car match))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 2031679..3b1a805 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -393,6 +393,9 @@ like <img alt=\"Some thing.\">."
   (let ((f (get-text-property (- (point) 1) 'face)))
     (memq f flyspell-prog-text-faces)))
 
+;; Records the binding of M-TAB in effect before flyspell was activated.
+(defvar flyspell--prev-meta-tab-binding)
+
 ;;;###autoload
 (defun flyspell-prog-mode ()
   "Turn on `flyspell-mode' for comments and strings."
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 97e64c9..db03a32 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1979,7 +1979,7 @@ and pass it the output of the last Ispell invocation."
 
 (defun ispell-send-replacement (misspelled replacement)
   "Notify Aspell that MISSPELLED should be spelled REPLACEMENT.
-This allows to improve the suggestion list based on actual misspellings."
+This allows improving the suggestion list based on actual misspellings."
   (and ispell-really-aspell
        (ispell-send-string (concat "$$ra " misspelled "," replacement "\n"))))
 
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index c725d9f..d1a6b87 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -1905,7 +1905,7 @@ instead or as well.  The variable may have one of these 
values:
    mouse    Highlighting is mouse driven.
    both     Both cursor and mouse trigger highlighting.
 
-Changing this variable requires to rebuild the selection and *toc* buffers
+Changing this variable requires rebuilding the selection and *toc* buffers
 to become effective (keys `g' or `r')."
   :group 'reftex-fontification-configurations
   :type '(choice
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el
index c1bb2a7..fd502dd 100644
--- a/lisp/tree-widget.el
+++ b/lisp/tree-widget.el
@@ -664,7 +664,7 @@ This hook should be local in the buffer setup to display 
widgets.")
          (flags  (widget-get tree :tree-widget--guide-flags))
          (indent (widget-get tree :indent))
          ;; Setup widget's image support.  Looking up for images, and
-         ;; setting widgets' :tag-glyph is done here, to allow to
+         ;; setting widgets' :tag-glyph is done here, to allow us to
          ;; dynamically change the image theme.
          (widget-image-enable (tree-widget-use-image-p))     ; Emacs
          (widget-glyph-enable widget-image-enable)           ; XEmacs
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 36a1d91..573feed 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -58,8 +58,8 @@
 ;; ******** FIX THE DOCUMENTATION *********
 ;;
 ;; - rework the displaying of error messages.
-;; - allow to flush messages only
-;; - allow to protect files like ChangeLog from flushing
+;; - allow the flushing of messages only
+;; - allow the protection of files like ChangeLog from flushing
 ;; - query the user for cvs-get-marked (for some cmds or if nothing's selected)
 ;; - don't return the first (resp last) FI if the cursor is before
 ;;   (resp after) it.
diff --git a/lisp/window.el b/lisp/window.el
index 620f4ed..948e2da 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2005,7 +2005,7 @@ SIDE can be any of the symbols `left', `top', `right' or
 
 ;; Predecessors to the below have been devised by Julian Assange in
 ;; change-windows-intuitively.el and Hovav Shacham in windmove.el.
-;; Neither of these allow to selectively ignore specific windows
+;; Neither of these allow one to selectively ignore specific windows
 ;; (windows whose `no-other-window' parameter is non-nil) as targets of
 ;; the movement.
 (defun window-in-direction (direction &optional window ignore sign wrap mini)
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index f184eb3..9f257ba 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -25,7 +25,8 @@
 ;;
 ;; See xwidget.c for more api functions.
 
-;; TODO this breaks compilation when we don't have xwidgets.
+;; This breaks compilation when we don't have xwidgets.
+;; And is pointless when we do, since it's in C and so preloaded.
 ;;(require 'xwidget-internal)
 
 ;;; Code:
@@ -33,9 +34,9 @@
 (require 'cl-lib)
 (require 'bookmark)
 
-(defcustom xwidget-webkit-scroll-behaviour 'native
-  "Scroll behaviour of the webkit instance.
-'native or 'image."
+(defcustom xwidget-webkit-scroll-behavior 'native
+  "Scrolling behavior of the webkit instance.
+The possible values are: `native' or `image'."
   :version "25.1"
   :group 'frames   ; TODO add xwidgets group if more options are added
   :type '(choice (const native) (const image)))
@@ -58,14 +59,11 @@
 (declare-function get-buffer-xwidgets "xwidget.c" (buffer))
 
 (defun xwidget-insert (pos type title width height &optional args)
-  "Insert an xwidget at POS.
-given ID, TYPE, TITLE WIDTH and
-HEIGHT in the current buffer.
-
-Return ID
-
-see `make-xwidget' for types suitable for TYPE.
-Optional argument ARGS usage depends on the xwidget."
+  "Insert an xwidget at position POS.
+Supply the xwidget's TYPE, TITLE, WIDTH, and HEIGHT.
+See `make-xwidget' for the possible TYPE values.
+The usage of optional argument ARGS depends on the xwidget.
+This returns the result of `make-xwidget'."
   (goto-char pos)
   (let ((id (make-xwidget (point) (point)
                           type title width height args)))
@@ -92,8 +90,8 @@ Optional argument ARGS usage depends on the xwidget."
 ;;;###autoload
 (defun xwidget-webkit-browse-url (url &optional new-session)
   "Ask xwidget-webkit to browse URL.
-NEW-SESSION specifies whether to create a new xwidget-webkit session.  URL
-defaults to the string looking like a url around the cursor position."
+NEW-SESSION specifies whether to create a new xwidget-webkit session.
+Interactively, URL defaults to the string looking like a url around point."
   (interactive (progn
                  (require 'browse-url)
                  (browse-url-interactive-arg "xwidget-webkit URL: "
@@ -141,32 +139,40 @@ defaults to the string looking like a url around the 
cursor position."
   "Keymap for `xwidget-webkit-mode'.")
 
 (defun xwidget-webkit-scroll-up ()
-  "Scroll webkit up,either native or like image mode."
+  "Scroll webkit up.
+Depending on the value of `xwidget-webkit-scroll-behavior',
+this scrolls in 'native' fashion, or like `image-mode' would."
   (interactive)
-  (if (eq xwidget-webkit-scroll-behaviour 'native)
+  (if (eq xwidget-webkit-scroll-behavior 'native)
       (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)
     (image-scroll-up)))
 
 (defun xwidget-webkit-scroll-down ()
-  "Scroll webkit down,either native or like image mode."
+  "Scroll webkit down.
+Depending on the value of `xwidget-webkit-scroll-behavior',
+this scrolls in 'native' fashion, or like `image-mode' would."
   (interactive)
-  (if (eq xwidget-webkit-scroll-behaviour 'native)
+  (if (eq xwidget-webkit-scroll-behavior 'native)
       (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)
     (image-scroll-down)))
 
 (defun xwidget-webkit-scroll-forward ()
-  "Scroll webkit forward,either native or like image mode."
+  "Scroll webkit forwards.
+Depending on the value of `xwidget-webkit-scroll-behavior',
+this scrolls in 'native' fashion, or like `image-mode' would."
   (interactive)
-  (if (eq xwidget-webkit-scroll-behaviour 'native)
+  (if (eq xwidget-webkit-scroll-behavior 'native)
       (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)
-    (xwidget-webkit-scroll-forward)))
+    (xwidget-webkit-scroll-forward)))   ; FIXME infloop!
 
 (defun xwidget-webkit-scroll-backward ()
-  "Scroll webkit backward,either native or like image mode."
+  "Scroll webkit backwards.
+Depending on the value of `xwidget-webkit-scroll-behavior',
+this scrolls in 'native' fashion, or like `image-mode' would."
   (interactive)
-  (if (eq xwidget-webkit-scroll-behaviour 'native)
+  (if (eq xwidget-webkit-scroll-behavior 'native)
       (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)
-    (xwidget-webkit-scroll-backward)))
+    (xwidget-webkit-scroll-backward))) ; FIXME infloop!
 
 
 ;; The xwidget event needs to go into a higher level handler
@@ -292,9 +298,7 @@ function findactiveelement(doc){
   )
 
 (defun xwidget-webkit-insert-string (xw str)
-  "Insert string in the active field in the webkit.
-Argument XW webkit.
-Argument STR string."
+  "Insert string STR in the active field in the webkit XW."
   ;; Read out the string in the field first and provide for edit.
   (interactive
    (let* ((xww (xwidget-webkit-current-session))
@@ -310,9 +314,9 @@ Argument STR string."
                        "findactiveelement(document).type;")))
      (list xww
            (cond ((equal "text" field-type)
-                  (read-string "text:" field-value))
+                  (read-string "Text: " field-value))
                  ((equal "password" field-type)
-                  (read-passwd "password:" nil field-value))
+                  (read-passwd "Password: " nil field-value))
                  ((equal "textarea" field-type)
                   (xwidget-webkit-begin-edit-textarea xww field-value))))))
   (xwidget-webkit-execute-script
@@ -325,7 +329,6 @@ Argument STR string."
 XW is the xwidget identifier, TEXT is retrieved from the webkit."
   (switch-to-buffer
    (generate-new-buffer "textarea"))
-
   (set (make-local-variable 'xwidget-xwbl) xw)
   (insert text))
 
@@ -343,11 +346,10 @@ XW is the xwidget identifier, TEXT is retrieved from the 
webkit."
   )
 
 (defun xwidget-webkit-show-named-element (xw element-name)
-  "Make named-element show.  for instance an anchor.
-Argument XW is the xwidget.
-Argument ELEMENT-NAME is the element name to display in the webkit xwidget."
+  "Make webkit xwidget XW show a named element ELEMENT-NAME.
+For example, use this to display an anchor."
   (interactive (list (xwidget-webkit-current-session)
-                     (read-string "element name:")))
+                     (read-string "Element name: ")))
   ;;TODO since an xwidget is an Emacs object, it is not trivial to do
   ;; some things that are taken for granted in a normal browser.
   ;; scrolling an anchor/named-element into view is one such thing.
@@ -371,11 +373,10 @@ Argument ELEMENT-NAME is the element name to display in 
the webkit xwidget."
     (set-window-vscroll (selected-window) y t)))
 
 (defun xwidget-webkit-show-id-element (xw element-id)
-  "Make id-element show.  for instance an anchor.
-Argument XW is the webkit xwidget.
-Argument ELEMENT-ID is the id of the element to show."
+  "Make webkit xwidget XW show an id-element ELEMENT-ID.
+For example, use this to display an anchor."
   (interactive (list (xwidget-webkit-current-session)
-                     (read-string "element id:")))
+                     (read-string "Element id: ")))
   (let ((y (string-to-number
             (xwidget-webkit-execute-script-rv
              xw
@@ -387,11 +388,10 @@ Argument ELEMENT-ID is the id of the element to show."
     (set-window-vscroll (selected-window) y t)))
 
 (defun xwidget-webkit-show-id-or-named-element (xw element-id)
-  "Make id-element show.  for instance an anchor.
-Argument XW is the webkit xwidget.
-Argument ELEMENT-ID is either a name or an element id."
+   "Make webkit xwidget XW show a name or element id ELEMENT-ID.
+For example, use this to display an anchor."
   (interactive (list (xwidget-webkit-current-session)
-                     (read-string "element id:")))
+                     (read-string "Name or element id: ")))
   (let* ((y1 (string-to-number
               (xwidget-webkit-execute-script-rv
                xw
@@ -415,15 +415,14 @@ Argument ELEMENT-ID is either a name or an element id."
 (defun xwidget-webkit-adjust-size-dispatch ()
   "Adjust size according to mode."
   (interactive)
-  (if (eq xwidget-webkit-scroll-behaviour 'native)
+  (if (eq xwidget-webkit-scroll-behavior 'native)
       (xwidget-webkit-adjust-size-to-window)
     (xwidget-webkit-adjust-size-to-content))
   ;; The recenter is intended to correct a visual glitch.
   ;; It errors out if the buffer isn't visible, but then we don't get
   ;; the glitch, so silence errors.
   (ignore-errors
-    (recenter-top-bottom))
-  )
+    (recenter-top-bottom)))
 
 (defun xwidget-webkit-adjust-size-to-window ()
   "Adjust webkit to window."
@@ -432,9 +431,7 @@ Argument ELEMENT-ID is either a name or an element id."
                   (window-pixel-height)))
 
 (defun xwidget-webkit-adjust-size (w h)
-  "Manually set webkit size.
-Argument W width.
-Argument H height."
+  "Manually set webkit size to width W, height H."
   ;; TODO shouldn't be tied to the webkit xwidget
   (interactive "nWidth:\nnHeight:\n")
   (xwidget-resize (xwidget-webkit-current-session) w h))
@@ -468,7 +465,7 @@ Argument H height."
     (xwidget-webkit-new-session url)))
 
 (defun xwidget-webkit-back ()
-  "Back in history."
+  "Go back in history."
   (interactive)
   (xwidget-webkit-execute-script (xwidget-webkit-current-session)
                                  "history.go(-1);"))
@@ -480,7 +477,7 @@ Argument H height."
                                  "history.go(0);"))
 
 (defun xwidget-webkit-current-url ()
-  "Get the webkit url.  place it on kill ring."
+  "Get the webkit url and place it on the kill-ring."
   (interactive)
   (let* ((rv (xwidget-webkit-execute-script-rv (xwidget-webkit-current-session)
                                                "document.URL"))
@@ -489,9 +486,9 @@ Argument H height."
     url))
 
 (defun xwidget-webkit-execute-script-rv (xw script &optional default)
-  "Same as 'xwidget-webkit-execute-script' but but with return value.
+  "Same as `xwidget-webkit-execute-script' but with return value.
 XW is the webkit instance.  SCRIPT is the script to execute.
-DEFAULT is the defaultreturn value."
+DEFAULT is the default return value."
   ;; Notice the ugly "title" hack.  It is needed because the Webkit
   ;; API at the time of writing didn't support returning values.  This
   ;; is a wrapper for the title hack so it's easy to remove should
@@ -518,7 +515,7 @@ DEFAULT is the defaultreturn value."
                                     "window.getSelection().toString();"))
 
 (defun xwidget-webkit-copy-selection-as-kill ()
-  "Get the webkit selection and put it on the kill ring."
+  "Get the webkit selection and put it on the kill-ring."
   (interactive)
   (kill-new (xwidget-webkit-get-selection)))
 
@@ -527,13 +524,15 @@ DEFAULT is the defaultreturn value."
 ;; Xwidget plist management (similar to the process plist functions)
 
 (defun xwidget-get (xwidget propname)
-  "Return the value of XWIDGET' PROPNAME property.
-This is the last value stored with `(xwidget-put XWIDGET PROPNAME VALUE)'."
+  "Get an xwidget's property value.
+XWIDGET is an xwidget, PROPNAME a property.
+Returns the last value stored with `xwidget-put'."
   (plist-get (xwidget-plist xwidget) propname))
 
 (defun xwidget-put (xwidget propname value)
-  "Change XWIDGET' PROPNAME property to VALUE.
-It can be retrieved with `(xwidget-get XWIDGET PROPNAME)'."
+  "Set an xwidget's property value.
+XWIDGET is an xwidget, PROPNAME a property to be set to specified VALUE.
+You can retrieve the value with `xwidget-get'."
   (set-xwidget-plist xwidget
                      (plist-put (xwidget-plist xwidget) propname value)))
 
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index e9532e6..1d7cb08 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,4 +1,4 @@
-# serial 22   -*- Autoconf -*-
+# serial 24   -*- Autoconf -*-
 
 dnl Find out how to get the file descriptor associated with an open DIR*.
 
@@ -35,13 +35,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
        gl_cv_func_dirfd_macro=yes,
        gl_cv_func_dirfd_macro=no)])
 
-  # Use the replacement only if we have no function or macro with that name.
-  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
-    if test $ac_cv_have_decl_dirfd = yes; then
-      # If the system declares dirfd already, let's declare rpl_dirfd instead.
+  # Use the replacement if we have no function or macro with that name,
+  # or if OS/2 kLIBC whose dirfd() does not work.
+  # Replace only if the system declares dirfd already.
+  case 
$ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+    no,no,*,yes | *,*,os2*,yes)
       REPLACE_DIRFD=1
-    fi
-  fi
+      AC_DEFINE([REPLACE_DIRFD], [1],
+        [Define to 1 if gnulib's dirfd() replacement is used.]);;
+  esac
 ])
 
 dnl Prerequisites of lib/dirfd.c.
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 63d6d8e..5b68312 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,4 +1,4 @@
-#serial 24
+#serial 25
 dnl Copyright (C) 2002, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -62,6 +62,16 @@ AC_DEFUN([gl_FUNC_DUP2],
                result |= 32;
              dup2 (2, 255);
              dup2 (2, 256);
+             /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
+             {
+               int fd = open (".", O_RDONLY);
+               if (fd == -1)
+                 result |= 64;
+               else if (dup2 (fd, fd + 1) == -1)
+                 result |= 128;
+
+               close (fd);
+             }
              return result;]])
         ],
         [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
@@ -78,6 +88,8 @@ AC_DEFUN([gl_FUNC_DUP2],
              gl_cv_func_dup2_works="guessing no" ;;
            *-android*) # implemented using dup3(), which fails if oldfd == 
newfd
              gl_cv_func_dup2_works="guessing no" ;;
+           os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+             gl_cv_func_dup2_works="guessing no" ;;
            *) gl_cv_func_dup2_works="guessing yes" ;;
          esac])
       ])
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4
index 0037e5f..bb61470 100644
--- a/m4/fcntl.m4
+++ b/m4/fcntl.m4
@@ -1,4 +1,4 @@
-# fcntl.m4 serial 8
+# fcntl.m4 serial 9
 dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -54,6 +54,17 @@ AC_DEFUN([gl_FUNC_FCNTL],
               if (errno != EINVAL) result |= 2;
               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
               if (errno != EINVAL) result |= 8;
+              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
+              {
+                int fd;
+                fd = open (".", O_RDONLY);
+                if (fd == -1)
+                  result |= 16;
+                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
+                  result |= 32;
+
+                close (fd);
+              }
               return result;]])],
          [gl_cv_func_fcntl_f_dupfd_works=yes],
          [gl_cv_func_fcntl_f_dupfd_works=no],
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 27ca70a..547af66 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -436,7 +436,8 @@ AC_DEFUN([gl_INIT],
   {
     if ! $gl_gnulib_enabled_dirfd; then
       gl_FUNC_DIRFD
-      if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
+      if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+         || test $REPLACE_DIRFD = 1; then
         AC_LIBOBJ([dirfd])
         gl_PREREQ_DIRFD
       fi
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index a016723..1876bec 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -1,5 +1,5 @@
 # Detect some bugs in glibc's implementation of utimes.
-# serial 3
+# serial 4
 
 dnl Copyright (C) 2003-2005, 2009-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_UTIMES],
 #include <stdlib.h>
 #include <stdio.h>
 #include <utime.h>
+#include <errno.h>
 
 static int
 inorder (time_t a, time_t b, time_t c)
@@ -45,7 +46,10 @@ main ()
 {
   int result = 0;
   char const *file = "conftest.utimes";
-  static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
+  /* On OS/2, file timestamps must be on or after 1980 in local time,
+     with an even number of seconds.  */
+  static struct timeval timeval[2] = {{315620000 + 10, 10},
+                                      {315620000 + 1000000, 999998}};
 
   /* Test whether utimes() essentially works.  */
   {
@@ -82,9 +86,19 @@ main ()
           result |= 1;
         else if (fstat (fd, &st0) != 0)
           result |= 1;
-        else if (utimes (file, timeval) != 0)
+        else if (utimes (file, timeval) != 0
+                 && (errno != EACCES
+                     /* OS/2 kLIBC utimes fails on opened files.  */
+                     || close (fd) != 0
+                     || utimes (file, timeval) != 0
+                     || (fd = open (file, O_WRONLY)) < 0))
           result |= 2;
-        else if (utimes (file, NULL) != 0)
+        else if (utimes (file, NULL) != 0
+                 && (errno != EACCES
+                     /* OS/2 kLIBC utimes fails on opened files.  */
+                     || close (fd) != 0
+                     || utimes (file, NULL) != 0
+                     || (fd = open (file, O_WRONLY)) < 0))
           result |= 8;
         else if (fstat (fd, &st1) != 0)
           result |= 1;
diff --git a/src/bidi.c b/src/bidi.c
index 7f5d16b..9b71454 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -3001,7 +3001,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
        {
          /* Arrrgh!!  The UAX#9 algorithm is too deeply entrenched in
             the assumption of batch-style processing; see clauses W4,
-            W5, and especially N1, which require to look far forward
+            W5, and especially N1, which require looking far forward
             (as well as back) in the buffer/string.  May the fleas of
             a thousand camels infest the armpits of those who design
             supposedly general-purpose algorithms by looking at their
diff --git a/src/emacs.c b/src/emacs.c
index f661196..7c818f5 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2191,7 +2191,7 @@ synchronize_locale (int category, Lisp_Object *plocale, 
Lisp_Object desired_loca
     {
       *plocale = desired_locale;
 #ifdef WINDOWSNT
-      /* Changing categories like LC_TIME usually requires to specify
+      /* Changing categories like LC_TIME usually requires specifying
         an encoding suitable for the new locale, but MS-Windows's
         'setlocale' will only switch the encoding when LC_ALL is
         specified.  So we ignore CATEGORY, use LC_ALL instead, and
diff --git a/src/lisp.h b/src/lisp.h
index ee055e9..6be2104 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2090,7 +2090,7 @@ struct Lisp_Marker
   /* For markers that point somewhere,
      this is used to chain of all the markers in a given buffer.  */
   /* We could remove it and use an array in buffer_text instead.
-     That would also allow to preserve it ordered.  */
+     That would also allow us to preserve it ordered.  */
   struct Lisp_Marker *next;
   /* This is the char position where the marker points.  */
   ptrdiff_t charpos;
diff --git a/src/nsterm.m b/src/nsterm.m
index 860c55d..f77aadb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -637,10 +637,11 @@ ns_menu_bar_should_be_hidden (void)
 
 static CGFloat
 ns_menu_bar_height (NSScreen *screen)
-/* The height of the menu bar, if visible. */
-{
-  //  NSTRACE ("ns_menu_bar_height");
+/* The height of the menu bar, if visible.
 
+   Note: Don't use this when fullscreen is enabled -- the screen
+   sometimes includes, sometimes excludes the menu bar area. */
+{
   CGFloat res;
 
   if (ns_menu_bar_should_be_hidden())
@@ -660,7 +661,7 @@ ns_menu_bar_height (NSScreen *screen)
 
     }
 
-  // NSTRACE_MSG (NSTRACE_FMT_RETURN "%.0f", res);
+  NSTRACE ("ns_menu_bar_height " NSTRACE_FMT_RETURN " %.0f", res);
 
   return res;
 }
@@ -714,7 +715,7 @@ ns_menu_bar_height (NSScreen *screen)
 //    Result: Menu bar visible, frame placed immediately below the menu.
 //
 
-static NSRect constrain_frame_rect(NSRect frameRect)
+static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
 {
   NSTRACE ("constrain_frame_rect(" NSTRACE_FMT_RECT ")",
              NSTRACE_ARG_RECT (frameRect));
@@ -746,7 +747,11 @@ static NSRect constrain_frame_rect(NSRect frameRect)
         {
           multiscreenRect = NSUnionRect (multiscreenRect, scrRect);
 
-          menu_bar_height = max(menu_bar_height, ns_menu_bar_height (s));
+          if (!isFullscreen)
+            {
+              CGFloat screen_menu_bar_height = ns_menu_bar_height (s);
+              menu_bar_height = max(menu_bar_height, screen_menu_bar_height);
+            }
         }
     }
 
@@ -840,7 +845,7 @@ ns_constrain_all_frames (void)
           if (![view isFullscreen])
             {
               [[view window]
-                setFrame:constrain_frame_rect([[view window] frame])
+                setFrame:constrain_frame_rect([[view window] frame], false)
                  display:NO];
             }
         }
@@ -1170,7 +1175,7 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
       // GNUstep doesn't provide named images.  This was reported in
       // 2011, see https://savannah.gnu.org/bugs/?33396
       //
-      // As a drop in replacment, a semi tranparent gray square is used.
+      // As a drop in replacement, a semitransparent gray square is used.
       self.image = [[NSImage alloc] initWithSize:NSMakeSize(32, 32)];
       [self.image lockFocus];
       [[NSColor colorForEmacsRed:0.5 green:0.5 blue:0.5 alpha:0.5] set];
@@ -6650,7 +6655,7 @@ not_in_argv (NSString *arg)
   NSString *name;
 
   NSTRACE ("[EmacsView initFrameFromEmacs:]");
-  NSTRACE_MSG ("cols:%d lines:%d\n", f->text_cols, f->text_lines);
+  NSTRACE_MSG ("cols:%d lines:%d", f->text_cols, f->text_lines);
 
   windowClosing = NO;
   processingCompose = NO;
@@ -7099,14 +7104,25 @@ not_in_argv (NSString *arg)
 
 - (BOOL)isFullscreen
 {
-  NSTRACE ("[EmacsView isFullscreen]");
+  BOOL res;
 
-  if (! fs_is_native) return nonfs_window != nil;
+  if (! fs_is_native)
+    {
+      res = (nonfs_window != nil);
+    }
+  else
+    {
 #ifdef HAVE_NATIVE_FS
-  return ([[self window] styleMask] & NSFullScreenWindowMask) != 0;
+      res = (([[self window] styleMask] & NSFullScreenWindowMask) != 0);
 #else
-  return NO;
+      res = NO;
 #endif
+    }
+
+  NSTRACE ("[EmacsView isFullscreen] " NSTRACE_FMT_RETURN " %d",
+           (int) res);
+
+  return res;
 }
 
 #ifdef HAVE_NATIVE_FS
@@ -7772,7 +7788,8 @@ not_in_argv (NSString *arg)
 #endif
 #endif
 
-  return constrain_frame_rect(frameRect);
+  return constrain_frame_rect(frameRect,
+                              [(EmacsView *)[self delegate] isFullscreen]);
 }
 
 
diff --git a/src/w32.c b/src/w32.c
index 6f1d5fd..067bb3d 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -95,7 +95,7 @@ typedef struct _MEMORY_STATUS_EX {
 } MEMORY_STATUS_EX,*LPMEMORY_STATUS_EX;
 
 /* These are here so that GDB would know about these data types.  This
-   allows to attach GDB to Emacs when a fatal exception is triggered
+   allows attaching GDB to Emacs when a fatal exception is triggered
    and Windows pops up the "application needs to be closed" dialog.
    At that point, _gnu_exception_handler, the top-level exception
    handler installed by the MinGW startup code, is somewhere on the
diff --git a/src/w32heap.c b/src/w32heap.c
index 3d1c5ff..00da86a 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -100,8 +100,8 @@ typedef struct _RTL_HEAP_PARAMETERS {
    special segment to the executable.  In order to be able to do this
    without losing too much space, we need to create a Windows heap at
    the specific address of the static array.  The RtlCreateHeap
-   available inside the NT kernel since XP will do this.  It allows to
-   create a non-growable heap at a specific address.  So before
+   available inside the NT kernel since XP will do this.  It allows the
+   creation of a non-growable heap at a specific address.  So before
    dumping, we create a non-growable heap at the address of the
    dumped_data[] array.  After dumping, we reuse memory allocated
    there without being able to free it (but most of it is not meant to
diff --git a/src/w32term.c b/src/w32term.c
index 54fd295..36a5021 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -3616,8 +3616,8 @@ w32_set_horizontal_scroll_bar_thumb (struct scroll_bar 
*bar,
   si.fMask = SIF_PAGE | SIF_POS | SIF_RANGE;
   si.nMin = 0;
   si.nMax = whole;
-  /* Allow nPage to be one larger than nPos so we don't allow to scroll
-     an already fully visible buffer.  */
+  /* Allow nPage to be one larger than nPos so we don't allow the scrolling
+     of an already fully visible buffer.  */
   si.nPage = min (portion, si.nMax) + 1;
   si.nPos = min (position, si.nMax);
   SetScrollInfo (w, SB_CTL, &si, TRUE);
diff --git a/src/window.c b/src/window.c
index 70b7e58..e1a30ee 100644
--- a/src/window.c
+++ b/src/window.c
@@ -7261,7 +7261,7 @@ resizing a window preferably resizes one adjacent window 
only.
 
 If this variable is t, splitting a window tries to get the space
 proportionally from all windows in the same combination.  This also
-allows to split a window that is otherwise too small or of fixed size.
+allows splitting a window that is otherwise too small or of fixed size.
 Resizing and deleting a window proportionally resize all windows in the
 same combination.
 
diff --git a/src/xdisp.c b/src/xdisp.c
index 5185e77..78fddd6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13139,7 +13139,7 @@ text_outside_line_unchanged_p (struct window *w,
         beginning of a paragraph, before the first strong directional
         character, can change the base direction of the paragraph (unless
         the buffer specifies a fixed paragraph direction), which will
-        require to redisplay the whole paragraph.  It might be worthwhile
+        require redisplaying the whole paragraph.  It might be worthwhile
         to find the paragraph limits and widen the range of redisplayed
         lines to that, but for now just give up this optimization.  */
       if (!NILP (BVAR (XBUFFER (w->contents), bidi_display_reordering))
@@ -18067,7 +18067,7 @@ try_window_id (struct window *w)
      beginning of a paragraph, before the first strong directional
      character, can change the base direction of the paragraph (unless
      the buffer specifies a fixed paragraph direction), which will
-     require to redisplay the whole paragraph.  It might be worthwhile
+     require redisplaying the whole paragraph.  It might be worthwhile
      to find the paragraph limits and widen the range of redisplayed
      lines to that, but for now just give up this optimization and
      redisplay from scratch.  */
diff --git a/src/xfaces.c b/src/xfaces.c
index 0bf4f0c..2880eed 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -80,7 +80,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    specs overwrite the font-spec in the 14th attribute.
 
 
-   Faces are frame-local by nature because Emacs allows to define the
+   Faces are frame-local by nature because Emacs allows you to define the
    same named face (face names are symbols) differently for different
    frames.  Each frame has an alist of face definitions for all named
    faces.  The value of a named face in such an alist is a Lisp vector
diff --git a/src/xwidget.c b/src/xwidget.c
index be3e4ca..8745416 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -393,7 +393,7 @@ webkit_mime_type_policy_typedecision_requested_cb
 {
   /* This function makes webkit send a download signal for all unknown
      mime types.  TODO: Defer the decision to Lisp, so that it's
-     possible to make Emacs handle teext mime for instance.xs.  */
+     possible to make Emacs handle mime text for instance.  */
   if (!webkit_web_view_can_show_mime_type (webView, mimetype))
     {
       webkit_web_policy_decision_download (policy_decision);
@@ -530,7 +530,7 @@ xwidget_init_view (struct xwidget *xww,
      container later.  Drawing should crop container window if necessary
      to handle case where xwidget is partially obscured by other Emacs
      windows.  Other containers than gtk_fixed where explored, but
-     gtk_fixed had the most predictable behaviour so far.  */
+     gtk_fixed had the most predictable behavior so far.  */
 
   xv->emacswindow = FRAME_GTK_WIDGET (s->f);
   xv->widgetwindow = gtk_fixed_new ();
@@ -594,7 +594,7 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
          WINDOW_BOTTOM_EDGE_Y (s->w) - WINDOW_MODE_LINE_HEIGHT (s->w) - y);
   clip_top = max (0, WINDOW_TOP_EDGE_Y (s->w) - y);
 
-  /* We are conserned with movement of the onscreen area.  The area
+  /* We are concerned with movement of the onscreen area.  The area
      might sit still when the widget actually moves.  This happens
      when an Emacs window border moves across a widget window.  So, if
      any corner of the outer widget clipping window moves, that counts
@@ -615,7 +615,7 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
   /* Clip the widget window if some parts happen to be outside
      drawable area.  An Emacs window is not a gtk window.  A gtk window
      covers the entire frame.  Clipping might have changed even if we
-     havent actualy moved, we try figure out when we need to reclip
+     haven't actually moved; try to figure out when we need to reclip
      for real.  */
   if (xv->clip_right != clip_right
       || xv->clip_bottom != clip_bottom
@@ -753,7 +753,7 @@ DEFUN ("xwidget-resize", Fxwidget_resize, Sxwidget_resize, 
3, 3, 0,
 DEFUN ("xwidget-set-adjustment",
        Fxwidget_set_adjustment, Sxwidget_set_adjustment, 4, 4, 0,
        doc: /* Set native scrolling for XWIDGET.
-AXIS can be 'vertical or 'horizontal.
+AXIS can be `vertical' or `horizontal'.
 If RELATIVE is t, scroll relative, otherwise absolutely.
 VALUE is the amount to scroll, either relatively or absolutely.  */)
   (Lisp_Object xwidget, Lisp_Object axis, Lisp_Object relative,
@@ -1132,7 +1132,7 @@ xwidget_end_redisplay (struct window *w, struct 
glyph_matrix *matrix)
      not in the desired matrix.
 
      This only takes care of xwidgets in active windows.  If a window
-     goes away from screen xwidget views wust be deleted.
+     goes away from the screen, xwidget views must be deleted.
 
      dump_glyph_matrix (matrix, 2);  */
   for (i = 0; i < matrix->nrows; ++i)
diff --git a/test/ChangeLog.1 b/test/ChangeLog.1
index 01cb97e..3520f13 100644
--- a/test/ChangeLog.1
+++ b/test/ChangeLog.1
@@ -343,10 +343,10 @@
 
        * automated/tildify-tests.el (tildify-space-undo-test--test):
        A new helper function for testing `tildify-double-space-undos'
-       behaviour in the `tildify-space' function.
+       behavior in the `tildify-space' function.
        (tildify-space-undo-test-html, tildify-space-undo-test-html-nbsp)
        (tildify-space-undo-test-xml, tildify-space-undo-test-tex):
-       New tests for `tildify-doule-space-undos' behaviour.
+       New tests for `tildify-doule-space-undos' behavior.
 
        * automated/tildify-tests.el (tildify-space-test--test):
        A new helper function for testing `tildify-space' function.
diff --git a/test/manual/etags/c-src/emacs/src/lisp.h 
b/test/manual/etags/c-src/emacs/src/lisp.h
index 0fb068d..96c52c0 100644
--- a/test/manual/etags/c-src/emacs/src/lisp.h
+++ b/test/manual/etags/c-src/emacs/src/lisp.h
@@ -2005,7 +2005,7 @@ struct Lisp_Marker
   /* For markers that point somewhere,
      this is used to chain of all the markers in a given buffer.  */
   /* We could remove it and use an array in buffer_text instead.
-     That would also allow to preserve it ordered.  */
+     That would also allow us to preserve it ordered.  */
   struct Lisp_Marker *next;
   /* This is the char position where the marker points.  */
   ptrdiff_t charpos;
diff --git a/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el 
b/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
index 6c28ba3..5d28657 100644
--- a/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
+++ b/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
@@ -2094,7 +2094,7 @@ for \\[find-tag] (which see)."
     (`apropos (etags--xref-find-definitions id t))))
 
 (defun etags--xref-find-definitions (pattern &optional regexp?)
-  ;; This emulates the behaviour of `find-tag-in-order' but instead of
+  ;; This emulates the behavior of `find-tag-in-order' but instead of
   ;; returning one match at a time all matches are returned as list.
   ;; NOTE: find-tag-tag-order is typically a buffer-local variable.
   (let* ((xrefs '())



reply via email to

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