]> code.delx.au - gnu-emacs/commitdiff
-
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 Jan 2016 19:43:26 +0000 (11:43 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 Jan 2016 19:43:26 +0000 (11:43 -0800)
111 files changed:
admin/check-doc-strings
build-aux/gitlog-to-changelog
build-aux/update-copyright
configure.ac
doc/emacs/anti.texi
doc/emacs/custom.texi
doc/emacs/mule.texi
doc/lispref/control.texi
doc/lispref/display.texi
doc/lispref/frames.texi
doc/lispref/functions.texi
doc/lispref/nonascii.texi
doc/lispref/streams.texi
doc/lispref/variables.texi
doc/lispref/windows.texi
doc/misc/dbus.texi
doc/misc/eww.texi
doc/misc/flymake.texi
doc/misc/octave-mode.texi
doc/misc/org.texi
doc/misc/reftex.texi
doc/misc/texinfo.tex
doc/misc/tramp.texi
doc/misc/url.texi
doc/misc/wisent.texi
etc/NEWS
lib-src/rcs2log
lib/acl-internal.c
lib/acl-internal.h
lib/binary-io.h
lib/dirent.in.h
lib/dirfd.c
lib/dup2.c
lib/fcntl.c
lib/fdopendir.c
lib/get-permissions.c
lib/mktime.c
lib/openat-proc.c
lib/sig2str.h
lib/stdint.in.h
lib/strftime.c
lisp/ChangeLog.17
lisp/autorevert.el
lisp/cedet/mode-local.el
lisp/cedet/semantic/senator.el
lisp/cedet/semantic/wisent.el
lisp/dos-fns.el
lisp/emacs-lisp/ert.el
lisp/emacs-lisp/pcase.el
lisp/emacs-lisp/tabulated-list.el
lisp/files-x.el
lisp/files.el
lisp/font-lock.el
lisp/frameset.el
lisp/gnus/gnus-agent.el
lisp/gnus/gnus-art.el
lisp/gnus/mm-util.el
lisp/international/characters.el
lisp/ldefs-boot.el
lisp/mail/mailclient.el
lisp/man.el
lisp/mh-e/mh-search.el
lisp/net/browse-url.el
lisp/net/nsm.el
lisp/net/tramp-cmds.el
lisp/net/tramp-gvfs.el
lisp/org/ChangeLog.1
lisp/org/org-crypt.el
lisp/org/org-element.el
lisp/org/org-feed.el
lisp/org/org-mobile.el
lisp/org/org.el
lisp/org/ox-ascii.el
lisp/org/ox-icalendar.el
lisp/org/ox-publish.el
lisp/org/ox.el
lisp/play/gamegrid.el
lisp/play/gomoku.el
lisp/progmodes/antlr-mode.el
lisp/progmodes/cc-engine.el
lisp/progmodes/etags.el
lisp/progmodes/python.el
lisp/progmodes/vhdl-mode.el
lisp/simple.el
lisp/strokes.el
lisp/textmodes/flyspell.el
lisp/textmodes/ispell.el
lisp/textmodes/reftex-vars.el
lisp/tree-widget.el
lisp/vc/pcvs.el
lisp/window.el
lisp/xwidget.el
m4/dirfd.m4
m4/dup2.m4
m4/fcntl.m4
m4/gnulib-comp.m4
m4/utimes.m4
src/bidi.c
src/emacs.c
src/lisp.h
src/nsterm.m
src/w32.c
src/w32heap.c
src/w32term.c
src/window.c
src/xdisp.c
src/xfaces.c
src/xwidget.c
test/ChangeLog.1
test/manual/etags/c-src/emacs/src/lisp.h
test/manual/etags/el-src/emacs/lisp/progmodes/etags.el

index 13e8b0cd8e71fb66195cd63ad7d2e6d359670536..63856d32871cf44653805271c752a6b55ab3901d 100755 (executable)
@@ -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";
   }
 }
-
index a42650478a2ecb5e1fb29b79f695aca0e03956f5..a2513d0efc702b4bc4ee149dc278027d935d3052 100755 (executable)
@@ -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
index 8c6ee1fdd3cca51efd94c1d2518393e6fc79eeab..17ee6b14d1155e2185756bdb3b79de43ef6c3af2 100755 (executable)
@@ -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.
 #
index 50bc04b4c87d77b0fb6163826bfdf68cad808e0c..4a0dc56874262da740fdda8bf21aa89c12d336c3 100644 (file)
@@ -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}
index ae13ae09a04a98feee6aa3449b845d904454e76f..ece4d9456f184547d84addf4fa111d68f4a4f912 100644 (file)
@@ -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
index 670848c65a1c5c771c652d5ef3a5bcfe2ada17e0..7be660c85d11ea4a29cf43788dfb8774040cfec8 100644 (file)
@@ -1299,8 +1299,8 @@ named @file{.dir-locals.el}@footnote{ 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}.
-}@footnote{ You can also use files like @file{.dir-locals2.el}, which
-are loaded in addition.  This is useful when @file{.dir-locals.el} is
+}@footnote{ 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
index bcde81b182ebd0b5273f0538f23b37d71679f9bc..40206d902b9b5de1c79f3e13eb01f938f1722371 100644 (file)
@@ -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
index df60347f839ec300830b00bf5895e45b4646366e..6fa802d9fddf3ec8dfb13db29f679a540e8efecf 100644 (file)
@@ -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 non-@code{nil}.  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, @w{@code{(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
-@var{upattern}.  This allows to match a pattern against the value of
+@var{upattern}.  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
index d77059916fce0c85ad0a597409c801172370031c..eaba03d57393e48299d0b1f2f04ecb3e91c0d5f1 100644 (file)
@@ -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
index 614b7db0cac20639eb6f09bd39e338e9b7271097..55d724275487499139a1c7eebf59535714303030 100644 (file)
@@ -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 non-@code{nil} 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
 
index c5f5b4c22c420f97de9f67e4544dc5b088274c2a..a2e94c34b62e34b1c1609adba9b2ac0f26065501 100644 (file)
@@ -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
 
index fca40238805826430773d2f5e77bba15bb4d155b..9cf3b5750f2a32cfd1d3ebde57eeab0d047b3279 100644 (file)
@@ -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 non-@code{nil} 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
index 80c194b1bdda0308e589b24efef3dbe088836664..41bc71e6aea0b4f05129afb22c0d80b94f478337 100644 (file)
@@ -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 MS-DOS@.
-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
index 42701614365026b623683830dac7052e84912a0d..6c53e9b6cca14aef4b2e66b034c00f1129072dc0 100644 (file)
@@ -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
-@file{.dir-locals*.el}@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
+@file{.dir-locals.el}@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
-@file{.dir-locals*.el}, 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,
-@file{.dir-locals.el} 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
-@file{.dir-locals2.el} override those in @file{.dir-locals.el}).  Note
-that, because of how lexicographic order works, values in
-@file{.dir-locals10.el} 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
+@ref{Directory Variables, , Per-directory Local Variables, emacs, The
+GNU Emacs Manual}, for more details.
 @end defvr
 
 @defun hack-dir-local-variables
index 7186791f94a71ff8dce2c1e1b12463085b6d3066..ca756e3ff7f3d75e4e58688fa24ff61e21af1b5a 100644 (file)
@@ -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
-@var{W2}.  The variable described next allows to do that.
+@var{W2}.  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 non-@code{nil} @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 non-@code{nil} @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 non-@code{nil}
+@code{allow-no-window} 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
index c5901aff1045fea4d1cac8cd0bf67c600f1227de..f4ebfebcbe381c5b7e425e0c51637c80bd0a7f6d 100644 (file)
@@ -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
index 14f0a8d0ea2b7a6dea0b755f8bfc5dc35ad91aea..0e9bedbe1d025d5f886e67a6e47ba6cb14f39014 100644 (file)
@@ -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
index 99633b60c707bcfebe918aab26ad691e35122c0d..1c4644bba1485ba728601d076da4bfb0d6a0f726 100644 (file)
@@ -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}.
 
index 65cc6a431eb5caca8285242ef31c47a3872b9a59..0307873df032c76b6a4c9defca8875fbeb4894f1 100644 (file)
@@ -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")}.
-@c The latter is perhaps more attractive because it allows to look up keys
+@c 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")}.
index ec676fca1d4a29e51e27c3ecf12367813170fed8..a5239acb59f131c77a1148c002555e198b838149 100644 (file)
@@ -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
+@samp{Top} node.
 
 @subsubheading File header
 
index 3dc3ed47b24e99dea1940bdc252a6c9134bfc8f0..ff7011c5a76772c75770eb9fe46b2ec024cf5107 100644 (file)
@@ -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
index 936c32dc5f431c715fa290b8a9098a6d9629da4b..8b3c9490f0951edc4de81bb748ec9147a94e300c 100644 (file)
@@ -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".
index 37bf7ea8bc48d792878284555b97404d4ef4b3e5..d01f9be9fbfc0695404d098d1e6946050b538b39 100644 (file)
@@ -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.
 
-@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}:
+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
index acdad6b0d101d368977a7e7b2ac33ba0e428ab1a..c46859968a2e40bc98afa91fc5c3a62ed106e0b6 100644 (file)
@@ -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
index a4462937f1c4ef57f34cc5ee45e14222503ae928..b4efbdad1b8825f4819aae0fb731c23d0f2afb63 100644 (file)
@@ -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
index d6044ce2c2b52148b6e0226181024e7985461685..a1292db61deafdb2c34eb2c0eb05a4f87a20717b 100644 (file)
--- 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'.
 
 +++
index 73213c5a37bd0a526d979cc514963bf750756d56..ff4d470a21a6a1e62e0540867d76026d045710a4 100755 (executable)
@@ -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
 
index 569e2f9c9e21c22f23bf86f852921e1f0a4f21ca..4de60c30ec11194c076dab5aed400854bc8dd02a 100644 (file)
@@ -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);
index 526e9f07788129e570b6794f94564369e64b1761..636273e0fb4762808c6e8c7d2645a4be20218914 100644 (file)
@@ -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
index d5c82335707f352aaa341eefcba38c6345447c53..9f17c0d3987b9b962c0fadbfeb7bcaa4edcd7bc2 100644 (file)
@@ -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
index 4c62737bdc6bfa4107ce71b22e37f5a3934ea1d8..65482d7b7ac085edd46d2aed0c588e40140cd296 100644 (file)
@@ -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.
index 1ea2a6373db8965183a99bd61944017018741ed0..a32584856a22be571f3501b4431f03dca9eef4b8 100644 (file)
 #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;
 }
index c913f473adceecfb0d5f5096adc7c546159b8880..5d026f21fa77ecce4f42ae7aee3833a6c8bb3108 100644 (file)
@@ -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
index 1ccc5acea8e4fb42218c0a806fa62a4b05f9561b..fd17e962f8bb9671c5e18ac60696d3583ec0edba 100644 (file)
@@ -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
index f30ab2431b59e7b5b1e75911a8de10ca4a92c432..c1f4dcbaca0668ca4cf0b0b7ab1eb5010df63b4e 100644 (file)
@@ -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
index 8c70df1984ce34705e488e4418304b652e24b3eb..bf40dad7801a0ec8d7f6aa6201d3c7c71c0706b8 100644 (file)
@@ -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.
index adbf8d482ae987fbff686ca68375cae6f84280b8..c9738d0daf9bfa0f70146bc95b2a627d9690bf3f 100644 (file)
@@ -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>
 
 #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
 \f
-#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 */
 \f
 /*
 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:
 */
index 15a8c799c80d69272267ad166d25b9d7d85816e4..1712340a00274ccb976a3c3a996475207be9124c 100644 (file)
 #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;
 }
index f3471702bac1397383dc837905f3adf3759a1cc1..2730774d165da62c17fd04fe435914f3559ddab7 100644 (file)
@@ -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
index d24139179505aae7740948af6589babd081b67a7..0bb9ad41b293765294ec5af4569990bd8f14e163 100644 (file)
@@ -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 */
 
index 10d3eb4ef318d39617226e8e324a1ba08ed7cebf..4e65190386d5ea311c3f7c2869ef7fc9328b2077 100644 (file)
@@ -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;
index ee812bde82ddc5c678056da0bd69a8f837adb258..1785a3367320937ebe9a9b355c6f0e361c88f60d 100644 (file)
 
 2014-12-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * 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.
 
 2014-06-30  Grégoire Jadi  <daimrod@gmail.com>
 
        * net/rcirc.el (rcirc-buffer-process): Restore previous
-       behaviour.  (Bug#17772)
+       behavior.  (Bug#17772)
 
 2014-06-29  Alan Mackenzie  <acm@muc.de>
 
index 5851a89ec976f53bb596295ca5631d9426f04b75..14e39bddd2e7e736e572e1d3c5d0bfe314065cf9 100644 (file)
@@ -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
index ce367485c16000da25ed072515e74680937500e7..c7e6615e0dfc5aaf0ae55c73171e2061c91c2819 100644 (file)
@@ -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:
 
index a45077e50e4949c2f6369ecdb2e7119c88537133..38abc9ebbd968fbd85dbdf3082f26f5f7d67e112 100644 (file)
@@ -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 ()
index 2df4b2a2e15f9e4b63e045a76d7ca51229949abd..d0632f1640c86cb79e8f8cc438b521686f06e011 100644 (file)
@@ -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.
 ;;
index 0ce2b23527dc5572d5e8f7d73415b0d377d149db..7188ae0bce7346e032dff8bf71dbaec1ca3f6950 100644 (file)
@@ -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)
index f4be947339493cc2514162b0b12d40ad1ef8a932..7a914da3977b207a4d13f71a95bd5075fef6c11a 100644 (file)
@@ -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))))
index 549ee96dd5fbc0378fd83c3f54324e5653535735..7be997e646982ffc7926456e91abd3d57d087870 100644 (file)
@@ -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)
index 68658d20b37e17bdfc68ec2af92ae289c6641716..00b029d8f3ee06a41c203185d77b575d19769836 100644 (file)
@@ -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)
index 2e1a728356e4814ac97112ca321ce53e0667143e..05ad7f57c5709de213b63dc78699b76582e7cd03 100644 (file)
@@ -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.
index 5a15c71aab6cd99f3c8b22b05f016d0b8f928af2..92ae4344e1c96ccd3803e4e04cd1f9f7b8414457 100644 (file)
@@ -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
index 988bf7bd2160d21ef5778c1724f2009c6838dfa4..471db6b148fedb8cee6fc597447f359d0280d258 100644 (file)
@@ -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.")
 
index b8d86c649ec9bd74c19ac3171d14d30c0e2ae206..2453f57e228a46756f68f5731b9c7125a63c45e0 100644 (file)
@@ -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:
index 9219ce04c1fb140659d4aed01faa4b76ce9ef874..80753c118130e4acbdb1d9c42d7facf99eb3452c 100644 (file)
@@ -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 ""))
index 11ce04f799afcdd89da75f14eea152c088a1c4c0..54bbfd857f15d9997d0a21de8b85dedc3c75a1cd 100644 (file)
@@ -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
 
index fb97479302bc51d4ebb71f7544ec25c0cbaa1f57..106d010a3dcc759896c1097ea3b2d7c1e5272a26 100644 (file)
@@ -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)))
index 2e947331abee3d78b2f4aff95458c426bc653483..a43c0f68070b28a8e5eb86ee0a76af015b6a8ec7 100644 (file)
@@ -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.
index f0c65fa032bdf772ed1f4782ef36ecad42c11e7b..7b46822aad77ed08a67eb15ae274c2fad4f92eb6 100644 (file)
@@ -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.
index bfd6e7d1424e4548e11cd365ffb1ff057f966504..eb1305a5e39bf58d604a638c29f0d35dc0cb40b2 100644 (file)
@@ -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.
index 40b77e6eeed87cbce246b8a83794d376ebe139e2..04a7fc3fe7ae4ca773d436d8795e96f6e180cfcb 100644 (file)
@@ -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
index 30b38919944bb27248118d89eb54b86bcfa7857b..6e607444ad888aebec134d3cd4fd231e054b59be 100644 (file)
@@ -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:
index edf91ab600083b7fd8e597af29c1d4f20b8a35b5..1a666e0d9e9939c22f20d4a905c5c62db23ee11a 100644 (file)
@@ -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
index ebdeeccc2c8f24143380e6a57d187d2ea4b4af91..ee8b55bf19256ccd8eb9c19776d16a40ef6ac057 100644 (file)
@@ -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
index 5e9af0b18ebbe71ffca4b176ed44e6ef1c9ebef5..856011fc0ee9844af639b2548d144bc87410e853 100644 (file)
@@ -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)
index 46bf3de098dd314b1ebe3bf97ee9e2159c1721d7..796a5d3d0dd40af31592af608d3a5444cf559ecb 100644 (file)
@@ -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.
index 57a427c30d40da2995f081e02dc07d482124463d..ccc849d226a68001289bbcfb2f2d206fcca1eb7d 100644 (file)
        (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.
index 22b02c84889654d69bd83e41d866b1e673e00442..8abe32befe01fe581482041ebce80cabc06b3ae4 100644 (file)
@@ -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
index e47d65f1037272dc06da5fe1b44d2010a83b20f8..a19f52c7923d6f57ec7c65dfde76459a7462f56c 100644 (file)
@@ -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.
 
index 2d71c8b6fccc76529be879dc0a7946ab3119f2ce..6d6f996954ad498b4e30e18d39ccba19c2779858 100644 (file)
@@ -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
index b11f4448a8d94ed06d92b307d00cc07526b18f9c..f535390790f0365954871037dfe9f914f9bf7cdb 100644 (file)
@@ -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
index 960b874bc7ee249a700732b1edd8a252a0aca503..6e7d54d39c0b88d878c417b938f17c3ed9fae26b 100644 (file)
@@ -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).
index 1907dc0c748a40f1a756a38b0b31c2c5568ec383..dcca608b3066e192a69b26f7872b183e3c5ce2bb 100644 (file)
 
 ;;; 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
index 44480673db8d03fbddaca18ef4534cd1b9d4dc8d..0d34ba19f45c8cff479dc0513e7f52bb850bf376 100644 (file)
@@ -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
index ec33bbda52d4b80e77bc43da1e9a739c3d208db8..38fdce1d0bf68fb790c4b73b5f3d645dac37f4a1 100644 (file)
@@ -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
index cc5a2d2bcf2463dd2e8add1904df56e29f25ef62..89d79738a63d9b48e347f324cfb215c8486ccff7 100644 (file)
@@ -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)
index 0a63644ab7f2f6e9144aabd3f31fecea865fdfe8..2c557ba7547920543925c59ec97119cf7e5a2c57 100644 (file)
@@ -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))
index c1372fa36d65d92c934542f5b51b34b709cd2b68..02ac240ad6e97beabf741a34c928ec3dca95cbfc 100644 (file)
@@ -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.
 
index 20880a806fd8457c7ecf0a874387335821d2381e..ee81add340c829efced0d9164ae3319a1e42b433 100644 (file)
@@ -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
index 018805d679f0b57250b4776f9d863b5d93a7f2e3..dc2480961d15fd9b365495a2294c77fe612cb58e 100644 (file)
@@ -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
index 271033b15f8b1c50132a5beac699dc84c204d57f..a2a0df2d6e1aee8b2ab8027de34d5069bad4527a 100644 (file)
@@ -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 '())
index a8c65fa23a97f2be4193b8e287c2ec6dedb4e644..01f7f251eddbcb80b85b08cc713c866935d31872 100644 (file)
@@ -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__'
index d20a6b2f6823410b863c67c7b117dbb1d7e9621c..b176e64652ecefa475c85983a0b287c3445f158f 100644 (file)
@@ -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.
index ed4ca91b2e5f8a6bf1bd647d99c61aa698a8a603..72e87a410fc5e95744833ecc98e9ed9929b9073c 100644 (file)
@@ -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)
index 8bdabc9e590fad495de483336464e81ea66819a6..5a2020d3ca0fff43766cd692fe6aadcbaf0645f9 100644 (file)
@@ -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))
index 20316794c5dea4991ceb4504e5b076d08cc8373d..3b1a805f51b2bedff171636644c8041803ace08a 100644 (file)
@@ -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."
index 97e64c906c81a3ae5de6bae6e06b8249b0dec88d..db03a3244a40208c963f4b0d395a253606d829b2 100644 (file)
@@ -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"))))
 
index c725d9f450ed7ffa6f233d78c7931442a522188e..d1a6b87da2e4b6834e10565277fe39e55bf813df 100644 (file)
@@ -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
index c1bb2a7adccec19feaafd4065fa7b026f8bb39b9..fd502dd1847277f3d6aca7f263377af7ea66a283 100644 (file)
@@ -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
index 36a1d91d90e6ba5c36988a142814ef82e847c679..573feedd047d20e98403dad611c9f1da044421ca 100644 (file)
@@ -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.
index 620f4ed26a9fa29318a77def2edeee6d667a7a79..948e2dae2fee9a5668ae62d55865db1c9a5d63b1 100644 (file)
@@ -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)
index f184eb31dbbe9033af621d1d7fe86dc2e672d260..9f257ba463af67e350dc6ca73e5cecc84ba9d700 100644 (file)
@@ -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)))
 (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)))
 
index e9532e60a999961ccc897bdd4cf265eef01b3ba6..1d7cb080d8e8b1a00d4bde1597295ca158f7d717 100644 (file)
@@ -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.
index 63d6d8eb6e29c7f2374a19f12ab74a52e90f94a4..5b68312b1e7f01680937ca782e3388603b46846c 100644 (file)
@@ -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])
       ])
index 0037e5fb650cd6b39498a548df7978ba8880a0ff..bb61470b2e1c328affc960e4c6ee214edafe67eb 100644 (file)
@@ -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],
index 27ca70a0d09ca4567010ae3a2b3916f4f0afd734..547af6641a1742dd193ca66ac63d47887f30a9be 100644 (file)
@@ -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
index a016723e24ae713ff27ce2bc8ef28620c6099ccd..1876bec7996714b57cf578c3ad59f5271cf6f899 100644 (file)
@@ -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;
index 7f5d16b39ed0fedc0820987917faf616ae68427a..9b714543dd2580b78d74afc8c32f1a42d7f769b5 100644 (file)
@@ -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
index f661196313f4789316e947dc0658d4ce02cf8d61..7c818f59c5cddf9ef32052379ecdda20419f973d 100644 (file)
@@ -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
index ee055e90699e9e410588cd4a8b5981db2a46dba2..6be2104ef9e6c99c23d82c7a5b915214b7e3038e 100644 (file)
@@ -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;
index 860c55de70f8557afc8d49a62b6c33a19baeac73..f77aadba67c59712b69d3fc82f23031876fe8ccb 100644 (file)
@@ -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]);
 }
 
 
index 6f1d5fd169862088290d24153f760210568f32ae..067bb3d7cad555f1f8a1bd781dcdb9149d316ffc 100644 (file)
--- 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
index 3d1c5ff50a252bb4b269f17bc11b989dbd6ac402..00da86a9598a99bc68316290f78625e1df4f84cb 100644 (file)
@@ -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
index 54fd2953d76d647841d977e0fca7bae83097979f..36a502123728f44350f7c8965a303989ea60dc11 100644 (file)
@@ -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);
index 70b7e58feb5ec17d1d4f7c8bb00ad2bda089f8b7..e1a30ee571408c2a43a9b1ea1627e82705ec971c 100644 (file)
@@ -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.
 
index 5185e77732407c059d68f4a84c7d2ed8beb48ccd..78fddd60fc09c13de1a264bac72587f0c1babc88 100644 (file)
@@ -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.  */
index 0bf4f0cefd6e48fad428e0624ec1dd559c326e36..2880eedc1e5be5adbbe9891c4151913444457719 100644 (file)
@@ -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
index be3e4ca573281b3e8282412000ff5e8d2df4a0c8..8745416f3dbe7f63c2696010abd6f99dd6b60aeb 100644 (file)
@@ -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)
index 01cb97e0da3fc1ace0b96235b6e38189cda433d4..3520f13df609503b7d365c712d54b91accb6106d 100644 (file)
 
        * 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.
index 0fb068d1a2c3c7df12cbc7e6b55b01131a363c2f..96c52c0469147179e8f2db6bc57bbbf7e656213c 100644 (file)
@@ -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;
index 6c28ba35a4c8c15a747461e7c5a09fdc30eebe02..5d28657e28ba15e6d7824e980744368d22360da4 100644 (file)
@@ -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 '())