-
This commit is contained in:
commit
cb4e054e41
111 changed files with 805 additions and 459 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
#
|
||||
|
|
16
configure.ac
16
configure.ac
|
@ -33,7 +33,7 @@ emacs_config_options=
|
|||
optsep=
|
||||
dnl This is the documented way to record the args passed to configure,
|
||||
dnl rather than $ac_configure_args.
|
||||
for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
|
||||
for opt in "$@" CFLAGS CPPFLAGS LDFLAGS; do
|
||||
case $opt in
|
||||
-n | --no-create | --no-recursion)
|
||||
continue ;;
|
||||
|
@ -330,7 +330,7 @@ OPTION_DEFAULT_ON([tiff],[don't compile with TIFF image support])
|
|||
OPTION_DEFAULT_ON([gif],[don't compile with GIF image support])
|
||||
OPTION_DEFAULT_ON([png],[don't compile with PNG image support])
|
||||
OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support])
|
||||
OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing])
|
||||
OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing (experimental)])
|
||||
OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
|
||||
OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
|
||||
|
||||
|
@ -3141,13 +3141,13 @@ AC_SUBST(LIBOTF_LIBS)
|
|||
AC_SUBST(M17N_FLT_CFLAGS)
|
||||
AC_SUBST(M17N_FLT_LIBS)
|
||||
|
||||
USE_CAIRO=no
|
||||
HAVE_CAIRO=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
if test "${with_cairo}" != "no"; then
|
||||
CAIRO_REQUIRED=1.12.0
|
||||
CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
|
||||
EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE, USE_CAIRO=yes, :)
|
||||
if test $USE_CAIRO = yes; then
|
||||
EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE)
|
||||
if test $HAVE_CAIRO = yes; then
|
||||
AC_DEFINE(USE_CAIRO, 1, [Define to 1 if using cairo.])
|
||||
else
|
||||
AC_MSG_ERROR([cairo requested but not found.])
|
||||
|
@ -4920,7 +4920,7 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then
|
|||
XMENU_OBJ=xmenu.o
|
||||
XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
|
||||
FONT_OBJ=xfont.o
|
||||
if test "$USE_CAIRO" = "yes"; then
|
||||
if test "$HAVE_CAIRO" = "yes"; then
|
||||
FONT_OBJ="ftfont.o ftcrfont.o"
|
||||
elif test "$HAVE_XFT" = "yes"; then
|
||||
FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
|
||||
|
@ -5268,7 +5268,7 @@ for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
|
|||
|
||||
case $opt in
|
||||
NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
|
||||
CAIRO|TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
|
||||
TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
|
||||
*) eval val=\${HAVE_$opt} ;;
|
||||
esac
|
||||
case x$val in
|
||||
|
@ -5295,7 +5295,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
|
|||
Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF
|
||||
Does Emacs use a png library? ${HAVE_PNG} $LIBPNG
|
||||
Does Emacs use -lrsvg-2? ${HAVE_RSVG}
|
||||
Does Emacs use cairo? ${USE_CAIRO}
|
||||
Does Emacs use cairo? ${HAVE_CAIRO}
|
||||
Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}
|
||||
Does Emacs support sound? ${HAVE_SOUND}
|
||||
Does Emacs use -lgpm? ${HAVE_GPM}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}.
|
||||
|
||||
|
|
|
@ -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")}.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 @@
|
|||
\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 @@
|
|||
\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 @@
|
|||
}%
|
||||
\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 @@
|
|||
\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".
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
32
etc/NEWS
32
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'.
|
||||
|
||||
+++
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
66
lib/dirfd.c
66
lib/dirfd.c
|
@ -22,11 +22,77 @@
|
|||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __KLIBC__
|
||||
# include <stdlib.h>
|
||||
# include <io.h>
|
||||
|
||||
static struct dirp_fd_list
|
||||
{
|
||||
DIR *dirp;
|
||||
int fd;
|
||||
struct dirp_fd_list *next;
|
||||
} *dirp_fd_start = NULL;
|
||||
|
||||
/* Register fd associated with dirp to dirp_fd_list. */
|
||||
int
|
||||
_gl_register_dirp_fd (int fd, DIR *dirp)
|
||||
{
|
||||
struct dirp_fd_list *new_dirp_fd = malloc (sizeof *new_dirp_fd);
|
||||
if (!new_dirp_fd)
|
||||
return -1;
|
||||
|
||||
new_dirp_fd->dirp = dirp;
|
||||
new_dirp_fd->fd = fd;
|
||||
new_dirp_fd->next = dirp_fd_start;
|
||||
|
||||
dirp_fd_start = new_dirp_fd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Unregister fd from dirp_fd_list with closing it */
|
||||
void
|
||||
_gl_unregister_dirp_fd (int fd)
|
||||
{
|
||||
struct dirp_fd_list *dirp_fd;
|
||||
struct dirp_fd_list *dirp_fd_prev;
|
||||
|
||||
for (dirp_fd_prev = NULL, dirp_fd = dirp_fd_start; dirp_fd;
|
||||
dirp_fd_prev = dirp_fd, dirp_fd = dirp_fd->next)
|
||||
{
|
||||
if (dirp_fd->fd == fd)
|
||||
{
|
||||
if (dirp_fd_prev)
|
||||
dirp_fd_prev->next = dirp_fd->next;
|
||||
else /* dirp_fd == dirp_fd_start */
|
||||
dirp_fd_start = dirp_fd_start->next;
|
||||
|
||||
close (fd);
|
||||
free (dirp_fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
dirfd (DIR *dir_p)
|
||||
{
|
||||
int fd = DIR_TO_FD (dir_p);
|
||||
if (fd == -1)
|
||||
#ifndef __KLIBC__
|
||||
errno = ENOTSUP;
|
||||
#else
|
||||
{
|
||||
struct dirp_fd_list *dirp_fd;
|
||||
|
||||
for (dirp_fd = dirp_fd_start; dirp_fd; dirp_fd = dirp_fd->next)
|
||||
if (dirp_fd->dirp == dir_p)
|
||||
return dirp_fd->fd;
|
||||
|
||||
errno = EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
|
51
lib/dup2.c
51
lib/dup2.c
|
@ -85,6 +85,57 @@ ms_windows_dup2 (int fd, int desired_fd)
|
|||
|
||||
# define dup2 ms_windows_dup2
|
||||
|
||||
# elif defined __KLIBC__
|
||||
|
||||
# include <InnoTekLIBC/backend.h>
|
||||
|
||||
static int
|
||||
klibc_dup2dirfd (int fd, int desired_fd)
|
||||
{
|
||||
int tempfd;
|
||||
int dupfd;
|
||||
|
||||
tempfd = open ("NUL", O_RDONLY);
|
||||
if (tempfd == -1)
|
||||
return -1;
|
||||
|
||||
if (tempfd == desired_fd)
|
||||
{
|
||||
close (tempfd);
|
||||
|
||||
char path[_MAX_PATH];
|
||||
if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
|
||||
return -1;
|
||||
|
||||
return open(path, O_RDONLY);
|
||||
}
|
||||
|
||||
dupfd = klibc_dup2dirfd (fd, desired_fd);
|
||||
|
||||
close (tempfd);
|
||||
|
||||
return dupfd;
|
||||
}
|
||||
|
||||
static int
|
||||
klibc_dup2 (int fd, int desired_fd)
|
||||
{
|
||||
int dupfd;
|
||||
struct stat sbuf;
|
||||
|
||||
dupfd = dup2 (fd, desired_fd);
|
||||
if (dupfd == -1 && errno == ENOTSUP \
|
||||
&& !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
|
||||
{
|
||||
close (desired_fd);
|
||||
|
||||
return klibc_dup2dirfd (fd, desired_fd);
|
||||
}
|
||||
|
||||
return dupfd;
|
||||
}
|
||||
|
||||
# define dup2 klibc_dup2
|
||||
# endif
|
||||
|
||||
int
|
||||
|
|
87
lib/fcntl.c
87
lib/fcntl.c
|
@ -162,6 +162,93 @@ dupfd (int oldfd, int newfd, int flags)
|
|||
}
|
||||
#endif /* W32 */
|
||||
|
||||
#ifdef __KLIBC__
|
||||
|
||||
# define INCL_DOS
|
||||
# include <os2.h>
|
||||
|
||||
static int
|
||||
klibc_fcntl (int fd, int action, /* arg */...)
|
||||
{
|
||||
va_list arg_ptr;
|
||||
int arg;
|
||||
struct stat sbuf;
|
||||
int result = -1;
|
||||
|
||||
va_start (arg_ptr, action);
|
||||
arg = va_arg (arg_ptr, int);
|
||||
result = fcntl (fd, action, arg);
|
||||
/* EPERM for F_DUPFD, ENOTSUP for others */
|
||||
if (result == -1 && (errno == EPERM || errno == ENOTSUP)
|
||||
&& !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
|
||||
{
|
||||
ULONG ulMode;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case F_DUPFD:
|
||||
/* Find available fd */
|
||||
while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
|
||||
arg++;
|
||||
|
||||
result = dup2 (fd, arg);
|
||||
break;
|
||||
|
||||
/* Using underlying APIs is right ? */
|
||||
case F_GETFD:
|
||||
if (DosQueryFHState (fd, &ulMode))
|
||||
break;
|
||||
|
||||
result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
|
||||
break;
|
||||
|
||||
case F_SETFD:
|
||||
if (arg & ~FD_CLOEXEC)
|
||||
break;
|
||||
|
||||
if (DosQueryFHState (fd, &ulMode))
|
||||
break;
|
||||
|
||||
if (arg & FD_CLOEXEC)
|
||||
ulMode |= OPEN_FLAGS_NOINHERIT;
|
||||
else
|
||||
ulMode &= ~OPEN_FLAGS_NOINHERIT;
|
||||
|
||||
/* Filter supported flags. */
|
||||
ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
|
||||
| OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
|
||||
|
||||
if (DosSetFHState (fd, ulMode))
|
||||
break;
|
||||
|
||||
result = 0;
|
||||
break;
|
||||
|
||||
case F_GETFL:
|
||||
result = 0;
|
||||
break;
|
||||
|
||||
case F_SETFL:
|
||||
if (arg != 0)
|
||||
break;
|
||||
|
||||
result = 0;
|
||||
break;
|
||||
|
||||
default :
|
||||
errno = EINVAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
va_end (arg_ptr);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
# define fcntl klibc_fcntl
|
||||
#endif
|
||||
|
||||
/* Perform the specified ACTION on the file descriptor FD, possibly
|
||||
using the argument ARG further described below. This replacement
|
||||
handles the following actions, and forwards all others on to the
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
12
lib/mktime.c
12
lib/mktime.c
|
@ -19,7 +19,7 @@
|
|||
|
||||
/* Define this to have a standalone program to test this implementation of
|
||||
mktime. */
|
||||
/* #define DEBUG 1 */
|
||||
/* #define DEBUG_MKTIME 1 */
|
||||
|
||||
#ifndef _LIBC
|
||||
# include <config.h>
|
||||
|
@ -38,13 +38,13 @@
|
|||
|
||||
#include <string.h> /* For the real memcpy prototype. */
|
||||
|
||||
#if defined DEBUG && DEBUG
|
||||
#if defined DEBUG_MKTIME && DEBUG_MKTIME
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
/* Make it work even if the system's libc has its own mktime routine. */
|
||||
# undef mktime
|
||||
# define mktime my_mktime
|
||||
#endif /* DEBUG */
|
||||
#endif /* DEBUG_MKTIME */
|
||||
|
||||
/* Some of the code in this file assumes that signed integer overflow
|
||||
silently wraps around. This assumption can't easily be programmed
|
||||
|
@ -600,7 +600,7 @@ libc_hidden_def (mktime)
|
|||
libc_hidden_weak (timelocal)
|
||||
#endif
|
||||
|
||||
#if defined DEBUG && DEBUG
|
||||
#if defined DEBUG_MKTIME && DEBUG_MKTIME
|
||||
|
||||
static int
|
||||
not_equal_tm (const struct tm *a, const struct tm *b)
|
||||
|
@ -732,10 +732,10 @@ main (int argc, char **argv)
|
|||
return status;
|
||||
}
|
||||
|
||||
#endif /* DEBUG */
|
||||
#endif /* DEBUG_MKTIME */
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
compile-command: "gcc -DDEBUG -I. -Wall -W -O2 -g mktime.c -o mktime"
|
||||
compile-command: "gcc -DDEBUG_MKTIME -I. -Wall -W -O2 -g mktime.c -o mktime"
|
||||
End:
|
||||
*/
|
||||
|
|
|
@ -30,24 +30,21 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __KLIBC__
|
||||
# include <InnoTekLIBC/backend.h>
|
||||
#endif
|
||||
|
||||
#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)
|
||||
|
||||
|
||||
/* 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. */
|
||||
#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))
|
||||
};
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
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. */
|
||||
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -4437,7 +4437,7 @@
|
|||
|
||||
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.
|
||||
|
||||
|
@ -9140,7 +9140,7 @@
|
|||
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>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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 ()
|
||||
|
|
|
@ -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.
|
||||
;;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
123
lisp/files.el
123
lisp/files.el
|
@ -3713,37 +3713,43 @@ VARIABLES list of the class. The list is processed in order.
|
|||
applied by recursively following these rules."
|
||||
(setf (alist-get class dir-locals-class-alist) variables))
|
||||
|
||||
(defconst dir-locals-file ".dir-locals"
|
||||
"Pattern for files that contain directory-local variables.
|
||||
(defconst dir-locals-file ".dir-locals.el"
|
||||
"File that contains directory-local variables.
|
||||
It has to be constant to enforce uniform values across different
|
||||
environments and users.
|
||||
|
||||
Multiple dir-locals files in the same directory are loaded in
|
||||
`string<' order.
|
||||
See also `dir-locals-file-2', whose values override this one's.
|
||||
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)))))))
|
||||
(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 (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)))
|
||||
locals-dir)))
|
||||
|
||||
(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."
|
||||
(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
|
||||
|
|
|
@ -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.")
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 ""))
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -32528,7 +32528,7 @@
|
|||
(org-export-normalize-links)
|
||||
(org-export-concatenate-multiline-links)
|
||||
(org-export-concatenate-multiline-emphasis): New functions,
|
||||
obtained from spliting the export preprocessor.
|
||||
obtained from splitting the export preprocessor.
|
||||
|
||||
* org-table.el (org-table-recalculate): Improve error message if
|
||||
the row number is invalid.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
|
||||
;;; Define Back-End
|
||||
;;
|
||||
;; The following setting won't allow to modify preferred charset
|
||||
;; The following setting won't allow modifying preferred charset
|
||||
;; through a buffer keyword or an option item, but, since the property
|
||||
;; will appear in communication channel nonetheless, it allows to
|
||||
;; override `org-ascii-charset' variable on the fly by the ext-plist
|
||||
;; will appear in communication channel nonetheless, it allows
|
||||
;; overriding `org-ascii-charset' variable on the fly by the ext-plist
|
||||
;; mechanism.
|
||||
;;
|
||||
;; We also install a filter for headlines and sections, in order to
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 '())
|
||||
|
|
|
@ -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__'
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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"))))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
113
lisp/xwidget.el
113
lisp/xwidget.el
|
@ -25,7 +25,8 @@
|
|||
;;
|
||||
;; See xwidget.c for more api functions.
|
||||
|
||||
;; TODO this breaks compilation when we don't have xwidgets.
|
||||
;; This breaks compilation when we don't have xwidgets.
|
||||
;; And is pointless when we do, since it's in C and so preloaded.
|
||||
;;(require 'xwidget-internal)
|
||||
|
||||
;;; Code:
|
||||
|
@ -33,9 +34,9 @@
|
|||
(require 'cl-lib)
|
||||
(require 'bookmark)
|
||||
|
||||
(defcustom xwidget-webkit-scroll-behaviour 'native
|
||||
"Scroll behaviour of the webkit instance.
|
||||
'native or 'image."
|
||||
(defcustom xwidget-webkit-scroll-behavior 'native
|
||||
"Scrolling behavior of the webkit instance.
|
||||
The possible values are: `native' or `image'."
|
||||
:version "25.1"
|
||||
:group 'frames ; TODO add xwidgets group if more options are added
|
||||
:type '(choice (const native) (const image)))
|
||||
|
@ -58,14 +59,11 @@
|
|||
(declare-function get-buffer-xwidgets "xwidget.c" (buffer))
|
||||
|
||||
(defun xwidget-insert (pos type title width height &optional args)
|
||||
"Insert an xwidget at POS.
|
||||
given ID, TYPE, TITLE WIDTH and
|
||||
HEIGHT in the current buffer.
|
||||
|
||||
Return ID
|
||||
|
||||
see `make-xwidget' for types suitable for TYPE.
|
||||
Optional argument ARGS usage depends on the xwidget."
|
||||
"Insert an xwidget at position POS.
|
||||
Supply the xwidget's TYPE, TITLE, WIDTH, and HEIGHT.
|
||||
See `make-xwidget' for the possible TYPE values.
|
||||
The usage of optional argument ARGS depends on the xwidget.
|
||||
This returns the result of `make-xwidget'."
|
||||
(goto-char pos)
|
||||
(let ((id (make-xwidget (point) (point)
|
||||
type title width height args)))
|
||||
|
@ -92,8 +90,8 @@ Optional argument ARGS usage depends on the xwidget."
|
|||
;;;###autoload
|
||||
(defun xwidget-webkit-browse-url (url &optional new-session)
|
||||
"Ask xwidget-webkit to browse URL.
|
||||
NEW-SESSION specifies whether to create a new xwidget-webkit session. URL
|
||||
defaults to the string looking like a url around the cursor position."
|
||||
NEW-SESSION specifies whether to create a new xwidget-webkit session.
|
||||
Interactively, URL defaults to the string looking like a url around point."
|
||||
(interactive (progn
|
||||
(require 'browse-url)
|
||||
(browse-url-interactive-arg "xwidget-webkit URL: "
|
||||
|
@ -141,32 +139,40 @@ defaults to the string looking like a url around the cursor position."
|
|||
"Keymap for `xwidget-webkit-mode'.")
|
||||
|
||||
(defun xwidget-webkit-scroll-up ()
|
||||
"Scroll webkit up,either native or like image mode."
|
||||
"Scroll webkit up.
|
||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
||||
this scrolls in 'native' fashion, or like `image-mode' would."
|
||||
(interactive)
|
||||
(if (eq xwidget-webkit-scroll-behaviour 'native)
|
||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)
|
||||
(image-scroll-up)))
|
||||
|
||||
(defun xwidget-webkit-scroll-down ()
|
||||
"Scroll webkit down,either native or like image mode."
|
||||
"Scroll webkit down.
|
||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
||||
this scrolls in 'native' fashion, or like `image-mode' would."
|
||||
(interactive)
|
||||
(if (eq xwidget-webkit-scroll-behaviour 'native)
|
||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)
|
||||
(image-scroll-down)))
|
||||
|
||||
(defun xwidget-webkit-scroll-forward ()
|
||||
"Scroll webkit forward,either native or like image mode."
|
||||
"Scroll webkit forwards.
|
||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
||||
this scrolls in 'native' fashion, or like `image-mode' would."
|
||||
(interactive)
|
||||
(if (eq xwidget-webkit-scroll-behaviour 'native)
|
||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)
|
||||
(xwidget-webkit-scroll-forward)))
|
||||
(xwidget-webkit-scroll-forward))) ; FIXME infloop!
|
||||
|
||||
(defun xwidget-webkit-scroll-backward ()
|
||||
"Scroll webkit backward,either native or like image mode."
|
||||
"Scroll webkit backwards.
|
||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
||||
this scrolls in 'native' fashion, or like `image-mode' would."
|
||||
(interactive)
|
||||
(if (eq xwidget-webkit-scroll-behaviour 'native)
|
||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)
|
||||
(xwidget-webkit-scroll-backward)))
|
||||
(xwidget-webkit-scroll-backward))) ; FIXME infloop!
|
||||
|
||||
|
||||
;; The xwidget event needs to go into a higher level handler
|
||||
|
@ -292,9 +298,7 @@ function findactiveelement(doc){
|
|||
)
|
||||
|
||||
(defun xwidget-webkit-insert-string (xw str)
|
||||
"Insert string in the active field in the webkit.
|
||||
Argument XW webkit.
|
||||
Argument STR string."
|
||||
"Insert string STR in the active field in the webkit XW."
|
||||
;; Read out the string in the field first and provide for edit.
|
||||
(interactive
|
||||
(let* ((xww (xwidget-webkit-current-session))
|
||||
|
@ -310,9 +314,9 @@ Argument STR string."
|
|||
"findactiveelement(document).type;")))
|
||||
(list xww
|
||||
(cond ((equal "text" field-type)
|
||||
(read-string "text:" field-value))
|
||||
(read-string "Text: " field-value))
|
||||
((equal "password" field-type)
|
||||
(read-passwd "password:" nil field-value))
|
||||
(read-passwd "Password: " nil field-value))
|
||||
((equal "textarea" field-type)
|
||||
(xwidget-webkit-begin-edit-textarea xww field-value))))))
|
||||
(xwidget-webkit-execute-script
|
||||
|
@ -325,7 +329,6 @@ Argument STR string."
|
|||
XW is the xwidget identifier, TEXT is retrieved from the webkit."
|
||||
(switch-to-buffer
|
||||
(generate-new-buffer "textarea"))
|
||||
|
||||
(set (make-local-variable 'xwidget-xwbl) xw)
|
||||
(insert text))
|
||||
|
||||
|
@ -343,11 +346,10 @@ XW is the xwidget identifier, TEXT is retrieved from the webkit."
|
|||
)
|
||||
|
||||
(defun xwidget-webkit-show-named-element (xw element-name)
|
||||
"Make named-element show. for instance an anchor.
|
||||
Argument XW is the xwidget.
|
||||
Argument ELEMENT-NAME is the element name to display in the webkit xwidget."
|
||||
"Make webkit xwidget XW show a named element ELEMENT-NAME.
|
||||
For example, use this to display an anchor."
|
||||
(interactive (list (xwidget-webkit-current-session)
|
||||
(read-string "element name:")))
|
||||
(read-string "Element name: ")))
|
||||
;;TODO since an xwidget is an Emacs object, it is not trivial to do
|
||||
;; some things that are taken for granted in a normal browser.
|
||||
;; scrolling an anchor/named-element into view is one such thing.
|
||||
|
@ -371,11 +373,10 @@ Argument ELEMENT-NAME is the element name to display in the webkit xwidget."
|
|||
(set-window-vscroll (selected-window) y t)))
|
||||
|
||||
(defun xwidget-webkit-show-id-element (xw element-id)
|
||||
"Make id-element show. for instance an anchor.
|
||||
Argument XW is the webkit xwidget.
|
||||
Argument ELEMENT-ID is the id of the element to show."
|
||||
"Make webkit xwidget XW show an id-element ELEMENT-ID.
|
||||
For example, use this to display an anchor."
|
||||
(interactive (list (xwidget-webkit-current-session)
|
||||
(read-string "element id:")))
|
||||
(read-string "Element id: ")))
|
||||
(let ((y (string-to-number
|
||||
(xwidget-webkit-execute-script-rv
|
||||
xw
|
||||
|
@ -387,11 +388,10 @@ Argument ELEMENT-ID is the id of the element to show."
|
|||
(set-window-vscroll (selected-window) y t)))
|
||||
|
||||
(defun xwidget-webkit-show-id-or-named-element (xw element-id)
|
||||
"Make id-element show. for instance an anchor.
|
||||
Argument XW is the webkit xwidget.
|
||||
Argument ELEMENT-ID is either a name or an element id."
|
||||
"Make webkit xwidget XW show a name or element id ELEMENT-ID.
|
||||
For example, use this to display an anchor."
|
||||
(interactive (list (xwidget-webkit-current-session)
|
||||
(read-string "element id:")))
|
||||
(read-string "Name or element id: ")))
|
||||
(let* ((y1 (string-to-number
|
||||
(xwidget-webkit-execute-script-rv
|
||||
xw
|
||||
|
@ -415,15 +415,14 @@ Argument ELEMENT-ID is either a name or an element id."
|
|||
(defun xwidget-webkit-adjust-size-dispatch ()
|
||||
"Adjust size according to mode."
|
||||
(interactive)
|
||||
(if (eq xwidget-webkit-scroll-behaviour 'native)
|
||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
||||
(xwidget-webkit-adjust-size-to-window)
|
||||
(xwidget-webkit-adjust-size-to-content))
|
||||
;; The recenter is intended to correct a visual glitch.
|
||||
;; It errors out if the buffer isn't visible, but then we don't get
|
||||
;; the glitch, so silence errors.
|
||||
(ignore-errors
|
||||
(recenter-top-bottom))
|
||||
)
|
||||
(recenter-top-bottom)))
|
||||
|
||||
(defun xwidget-webkit-adjust-size-to-window ()
|
||||
"Adjust webkit to window."
|
||||
|
@ -432,9 +431,7 @@ Argument ELEMENT-ID is either a name or an element id."
|
|||
(window-pixel-height)))
|
||||
|
||||
(defun xwidget-webkit-adjust-size (w h)
|
||||
"Manually set webkit size.
|
||||
Argument W width.
|
||||
Argument H height."
|
||||
"Manually set webkit size to width W, height H."
|
||||
;; TODO shouldn't be tied to the webkit xwidget
|
||||
(interactive "nWidth:\nnHeight:\n")
|
||||
(xwidget-resize (xwidget-webkit-current-session) w h))
|
||||
|
@ -468,7 +465,7 @@ Argument H height."
|
|||
(xwidget-webkit-new-session url)))
|
||||
|
||||
(defun xwidget-webkit-back ()
|
||||
"Back in history."
|
||||
"Go back in history."
|
||||
(interactive)
|
||||
(xwidget-webkit-execute-script (xwidget-webkit-current-session)
|
||||
"history.go(-1);"))
|
||||
|
@ -480,7 +477,7 @@ Argument H height."
|
|||
"history.go(0);"))
|
||||
|
||||
(defun xwidget-webkit-current-url ()
|
||||
"Get the webkit url. place it on kill ring."
|
||||
"Get the webkit url and place it on the kill-ring."
|
||||
(interactive)
|
||||
(let* ((rv (xwidget-webkit-execute-script-rv (xwidget-webkit-current-session)
|
||||
"document.URL"))
|
||||
|
@ -489,9 +486,9 @@ Argument H height."
|
|||
url))
|
||||
|
||||
(defun xwidget-webkit-execute-script-rv (xw script &optional default)
|
||||
"Same as 'xwidget-webkit-execute-script' but but with return value.
|
||||
"Same as `xwidget-webkit-execute-script' but with return value.
|
||||
XW is the webkit instance. SCRIPT is the script to execute.
|
||||
DEFAULT is the defaultreturn value."
|
||||
DEFAULT is the default return value."
|
||||
;; Notice the ugly "title" hack. It is needed because the Webkit
|
||||
;; API at the time of writing didn't support returning values. This
|
||||
;; is a wrapper for the title hack so it's easy to remove should
|
||||
|
@ -518,7 +515,7 @@ DEFAULT is the defaultreturn value."
|
|||
"window.getSelection().toString();"))
|
||||
|
||||
(defun xwidget-webkit-copy-selection-as-kill ()
|
||||
"Get the webkit selection and put it on the kill ring."
|
||||
"Get the webkit selection and put it on the kill-ring."
|
||||
(interactive)
|
||||
(kill-new (xwidget-webkit-get-selection)))
|
||||
|
||||
|
@ -527,13 +524,15 @@ DEFAULT is the defaultreturn value."
|
|||
;; Xwidget plist management (similar to the process plist functions)
|
||||
|
||||
(defun xwidget-get (xwidget propname)
|
||||
"Return the value of XWIDGET' PROPNAME property.
|
||||
This is the last value stored with `(xwidget-put XWIDGET PROPNAME VALUE)'."
|
||||
"Get an xwidget's property value.
|
||||
XWIDGET is an xwidget, PROPNAME a property.
|
||||
Returns the last value stored with `xwidget-put'."
|
||||
(plist-get (xwidget-plist xwidget) propname))
|
||||
|
||||
(defun xwidget-put (xwidget propname value)
|
||||
"Change XWIDGET' PROPNAME property to VALUE.
|
||||
It can be retrieved with `(xwidget-get XWIDGET PROPNAME)'."
|
||||
"Set an xwidget's property value.
|
||||
XWIDGET is an xwidget, PROPNAME a property to be set to specified VALUE.
|
||||
You can retrieve the value with `xwidget-get'."
|
||||
(set-xwidget-plist xwidget
|
||||
(plist-put (xwidget-plist xwidget) propname value)))
|
||||
|
||||
|
|
16
m4/dirfd.m4
16
m4/dirfd.m4
|
@ -1,4 +1,4 @@
|
|||
# serial 22 -*- Autoconf -*-
|
||||
# serial 24 -*- Autoconf -*-
|
||||
|
||||
dnl Find out how to get the file descriptor associated with an open DIR*.
|
||||
|
||||
|
@ -35,13 +35,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
|
|||
gl_cv_func_dirfd_macro=yes,
|
||||
gl_cv_func_dirfd_macro=no)])
|
||||
|
||||
# Use the replacement only if we have no function or macro with that name.
|
||||
if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
|
||||
if test $ac_cv_have_decl_dirfd = yes; then
|
||||
# If the system declares dirfd already, let's declare rpl_dirfd instead.
|
||||
# Use the replacement if we have no function or macro with that name,
|
||||
# or if OS/2 kLIBC whose dirfd() does not work.
|
||||
# Replace only if the system declares dirfd already.
|
||||
case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
|
||||
no,no,*,yes | *,*,os2*,yes)
|
||||
REPLACE_DIRFD=1
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE([REPLACE_DIRFD], [1],
|
||||
[Define to 1 if gnulib's dirfd() replacement is used.]);;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl Prerequisites of lib/dirfd.c.
|
||||
|
|
14
m4/dup2.m4
14
m4/dup2.m4
|
@ -1,4 +1,4 @@
|
|||
#serial 24
|
||||
#serial 25
|
||||
dnl Copyright (C) 2002, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -62,6 +62,16 @@ AC_DEFUN([gl_FUNC_DUP2],
|
|||
result |= 32;
|
||||
dup2 (2, 255);
|
||||
dup2 (2, 256);
|
||||
/* On OS/2 kLIBC, dup2() does not work on a directory fd. */
|
||||
{
|
||||
int fd = open (".", O_RDONLY);
|
||||
if (fd == -1)
|
||||
result |= 64;
|
||||
else if (dup2 (fd, fd + 1) == -1)
|
||||
result |= 128;
|
||||
|
||||
close (fd);
|
||||
}
|
||||
return result;]])
|
||||
],
|
||||
[gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
|
||||
|
@ -78,6 +88,8 @@ AC_DEFUN([gl_FUNC_DUP2],
|
|||
gl_cv_func_dup2_works="guessing no" ;;
|
||||
*-android*) # implemented using dup3(), which fails if oldfd == newfd
|
||||
gl_cv_func_dup2_works="guessing no" ;;
|
||||
os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
|
||||
gl_cv_func_dup2_works="guessing no" ;;
|
||||
*) gl_cv_func_dup2_works="guessing yes" ;;
|
||||
esac])
|
||||
])
|
||||
|
|
13
m4/fcntl.m4
13
m4/fcntl.m4
|
@ -1,4 +1,4 @@
|
|||
# fcntl.m4 serial 8
|
||||
# fcntl.m4 serial 9
|
||||
dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -54,6 +54,17 @@ AC_DEFUN([gl_FUNC_FCNTL],
|
|||
if (errno != EINVAL) result |= 2;
|
||||
if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
|
||||
if (errno != EINVAL) result |= 8;
|
||||
/* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
|
||||
{
|
||||
int fd;
|
||||
fd = open (".", O_RDONLY);
|
||||
if (fd == -1)
|
||||
result |= 16;
|
||||
else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
|
||||
result |= 32;
|
||||
|
||||
close (fd);
|
||||
}
|
||||
return result;]])],
|
||||
[gl_cv_func_fcntl_f_dupfd_works=yes],
|
||||
[gl_cv_func_fcntl_f_dupfd_works=no],
|
||||
|
|
|
@ -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
|
||||
|
|
22
m4/utimes.m4
22
m4/utimes.m4
|
@ -1,5 +1,5 @@
|
|||
# Detect some bugs in glibc's implementation of utimes.
|
||||
# serial 3
|
||||
# serial 4
|
||||
|
||||
dnl Copyright (C) 2003-2005, 2009-2016 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
|
@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_UTIMES],
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <utime.h>
|
||||
#include <errno.h>
|
||||
|
||||
static int
|
||||
inorder (time_t a, time_t b, time_t c)
|
||||
|
@ -45,7 +46,10 @@ main ()
|
|||
{
|
||||
int result = 0;
|
||||
char const *file = "conftest.utimes";
|
||||
static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
|
||||
/* On OS/2, file timestamps must be on or after 1980 in local time,
|
||||
with an even number of seconds. */
|
||||
static struct timeval timeval[2] = {{315620000 + 10, 10},
|
||||
{315620000 + 1000000, 999998}};
|
||||
|
||||
/* Test whether utimes() essentially works. */
|
||||
{
|
||||
|
@ -82,9 +86,19 @@ main ()
|
|||
result |= 1;
|
||||
else if (fstat (fd, &st0) != 0)
|
||||
result |= 1;
|
||||
else if (utimes (file, timeval) != 0)
|
||||
else if (utimes (file, timeval) != 0
|
||||
&& (errno != EACCES
|
||||
/* OS/2 kLIBC utimes fails on opened files. */
|
||||
|| close (fd) != 0
|
||||
|| utimes (file, timeval) != 0
|
||||
|| (fd = open (file, O_WRONLY)) < 0))
|
||||
result |= 2;
|
||||
else if (utimes (file, NULL) != 0)
|
||||
else if (utimes (file, NULL) != 0
|
||||
&& (errno != EACCES
|
||||
/* OS/2 kLIBC utimes fails on opened files. */
|
||||
|| close (fd) != 0
|
||||
|| utimes (file, NULL) != 0
|
||||
|| (fd = open (file, O_WRONLY)) < 0))
|
||||
result |= 8;
|
||||
else if (fstat (fd, &st1) != 0)
|
||||
result |= 1;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue