Skip to content

Commit 3313e53

Browse files
author
Yuuki Harano
committed
Merge branch 'master' of https://github.com/emacs-mirror/emacs into pgtk
2 parents 50eb9f1 + 7c5d6a2 commit 3313e53

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+5260
-4438
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Copyright (C) 2001-2019 Free Software Foundation, Inc.
22
See the end of the file for license conditions.
33

44

5-
This directory tree holds version 27.0.50 of GNU Emacs, the extensible,
5+
This directory tree holds version 28.0.50 of GNU Emacs, the extensible,
66
customizable, self-documenting real-time display editor.
77

88
The file INSTALL in this directory says how to build and install GNU

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
2323

2424
AC_PREREQ(2.65)
2525
dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el.
26-
AC_INIT(GNU Emacs, 27.0.50, [email protected], , https://www.gnu.org/software/emacs/)
26+
AC_INIT(GNU Emacs, 28.0.50, [email protected], , https://www.gnu.org/software/emacs/)
2727

2828
dnl Set emacs_config_options to the options of 'configure', quoted for the shell,
2929
dnl and then quoted again for a C string. Separate options with spaces.
@@ -3786,9 +3786,11 @@ AC_CONFIG_FILES([src/emacs-module.h])
37863786
AC_SUBST_FILE([module_env_snippet_25])
37873787
AC_SUBST_FILE([module_env_snippet_26])
37883788
AC_SUBST_FILE([module_env_snippet_27])
3789+
AC_SUBST_FILE([module_env_snippet_28])
37893790
module_env_snippet_25="$srcdir/src/module-env-25.h"
37903791
module_env_snippet_26="$srcdir/src/module-env-26.h"
37913792
module_env_snippet_27="$srcdir/src/module-env-27.h"
3793+
module_env_snippet_28="$srcdir/src/module-env-28.h"
37923794
emacs_major_version="${PACKAGE_VERSION%%.*}"
37933795
AC_SUBST(emacs_major_version)
37943796

doc/emacs/files.texi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,9 @@ non-@code{nil} (the default is @code{t}), and renaming would change
690690
the file's owner or group, use copying.
691691

692692
If you change @code{backup-by-copying-when-mismatch} to @code{nil},
693-
Emacs checks the numeric user-id of the file's owner. If this is
694-
higher than @code{backup-by-copying-when-privileged-mismatch}, then it
693+
Emacs checks the numeric user-id of the file's owner and the numeric
694+
group-id of the file's group. If either is
695+
no greater than @code{backup-by-copying-when-privileged-mismatch}, then it
695696
behaves as though @code{backup-by-copying-when-mismatch} is
696697
non-@code{nil} anyway.
697698

doc/emacs/frames.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ and shows it again when more tabs are created. The value @code{nil}
12681268
always keeps the tab bar hidden; in this case it's still possible to
12691269
use persistent named window configurations without using the tab bar
12701270
by typing the related commands: @kbd{M-x tab-new}, @kbd{M-x tab-next},
1271-
@kbd{M-x tab-list}, @kbd{M-x tab-close}, etc.
1271+
@kbd{M-x tab-close}, @kbd{M-x tab-switcher}, etc.
12721272

12731273
@kindex C-x t
12741274
The prefix key @kbd{C-x t} is analogous to @kbd{C-x 5}.

doc/lispref/backups.texi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ non-@code{nil}.
232232
@defopt backup-by-copying-when-privileged-mismatch
233233
This variable, if non-@code{nil}, specifies the same behavior as
234234
@code{backup-by-copying-when-mismatch}, but only for certain user-id
235-
values: namely, those less than or equal to a certain number. You set
236-
this variable to that number.
235+
and group-id values: namely, those less than or equal to a certain number.
236+
You set this variable to that number.
237237

238238
Thus, if you set @code{backup-by-copying-when-privileged-mismatch}
239-
to 0, backup by copying is done for the superuser only,
239+
to 0, backup by copying is done for the superuser and group 0 only,
240240
when necessary to prevent a change in the owner of the file.
241241

242242
The default is 200.

doc/lispref/display.texi

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,36 @@ reformatted, with undesirable results. Instead, use @code{(message
306306
"%s" @var{string})}.
307307
@end defun
308308

309+
@defvar set-message-function
310+
If this variable is non-@code{nil}, it should be a function of one
311+
argument, the text of a message to display in the echo area. This
312+
function will be called by @code{message} and related functions. If
313+
the function returns @code{nil}, the message is displayed in the echo
314+
area as usual. If this function returns a string, that string is
315+
displayed in the echo area instead of the original one. If this
316+
function returns other non-@code{nil} values, that means the message
317+
was already handled, so @code{message} will not display anything in
318+
the echo area. See also @code{clear-message-function} that can be
319+
used to clear the message displayed by this function.
320+
321+
The default value is the function that displays the message at the end
322+
of the minibuffer when the minibuffer is active.
323+
@end defvar
324+
325+
@defvar clear-message-function
326+
If this variable is non-@code{nil}, @code{message} and related
327+
functions call it with no arguments when their argument message is
328+
@code{nil} or the empty string.
329+
330+
Usually this function is called when the next input event arrives
331+
after displaying an echo-area message. The function is expected to
332+
clear the message displayed by its counterpart function specified by
333+
@code{set-message-function}.
334+
335+
The default value is the function that clears the message displayed at
336+
the end of the minibuffer when the minibuffer is active.
337+
@end defvar
338+
309339
@defvar inhibit-message
310340
When this variable is non-@code{nil}, @code{message} and related functions
311341
will not use the Echo Area to display messages.

doc/lispref/frames.texi

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,30 +1166,27 @@ immediately after running @code{window-size-change-functions} for
11661166
@cindex implied resizing of frame
11671167

11681168
By default, Emacs tries to keep the number of lines and columns of a
1169-
frame's text area unaltered when, for example, adding or removing the
1170-
menu bar, changing the default font or setting the width of the frame's
1171-
scroll bars. This means, however, that in such case Emacs must ask the
1172-
window manager to resize the outer frame in order to accommodate the
1173-
size change. Note that wrapping a menu or tool bar usually does not
1174-
resize the frame's outer size, hence this will alter the number of
1175-
displayed lines.
1169+
frame's text area unaltered when, for example, toggling its menu or
1170+
tool bar, changing its default font or setting the width of any of its
1171+
scroll bars. This means that in such case Emacs must ask the window
1172+
manager to resize the frame's window in order to accommodate the size
1173+
change.
11761174

11771175
Occasionally, such @dfn{implied frame resizing} may be unwanted, for
1178-
example, when the frame is maximized or made full-screen (where it's
1179-
turned off by default). In other cases you can disable implied resizing
1180-
with the following option:
1176+
example, when a frame has been maximized or made full-screen (where
1177+
it's turned off by default). In general, users can disable implied
1178+
resizing with the following option:
11811179

11821180
@defopt frame-inhibit-implied-resize
1183-
If this option is @code{nil}, changing font, menu bar, tool bar,
1184-
internal borders, fringes or scroll bars of a specific frame may
1185-
implicitly resize the frame's display area in order to preserve the
1186-
number of columns or lines the frame displays. If this option is
1187-
non-@code{nil}, no implied resizing is done.
1181+
If this option is @code{nil}, changing a frame's font, menu bar, tool
1182+
bar, internal borders, fringes or scroll bars may resize its outer
1183+
frame in order to keep the number of columns or lines of its text area
1184+
unaltered. If this option is @code{t}, no such resizing is done.
11881185

11891186
The value of this option can be also a list of frame parameters. In
1190-
that case, implied resizing is inhibited when changing a parameter that
1191-
appears in this list. The frame parameters currently handled by this
1192-
option are: @code{font}, @code{font-backend},
1187+
that case, implied resizing is inhibited for the change of a parameter
1188+
that appears in this list. Parameters currently handled by this
1189+
option are @code{font}, @code{font-backend},
11931190
@code{internal-border-width}, @code{menu-bar-lines} and
11941191
@code{tool-bar-lines}.
11951192

@@ -1200,20 +1197,30 @@ as if the frame contained just one live window. This means, for
12001197
example, that removing vertical scroll bars on a frame containing
12011198
several side by side windows will shrink the outer frame width by the
12021199
width of one scroll bar provided this option is @code{nil} and keep it
1203-
unchanged if this option is either @code{t} or a list containing
1200+
unchanged if this option is @code{t} or a list containing
12041201
@code{vertical-scroll-bars}.
12051202

1206-
The default value is @code{'(tool-bar-lines)} for Lucid, Motif and
1207-
MS-Windows (which means that adding/removing a tool bar there does not
1208-
change the outer frame height), @code{nil} on all other window systems
1209-
including GTK+ (which means that changing any of the parameters listed
1210-
above may change the size of the outer frame), and @code{t} otherwise
1211-
(which means the outer frame size never changes implicitly when there's
1212-
no window system support).
1203+
The default value is @code{'(tab-bar-lines tool-bar-lines)} for Lucid,
1204+
Motif and MS-Windows (which means that adding/removing a tool or tab
1205+
bar there does not change the outer frame height),
1206+
@code{'(tab-bar-lines)} on all other window systems including GTK+
1207+
(which means that changing any of the parameters listed above with the
1208+
exception of @code{tab-bar-lines} may change the size of the outer
1209+
frame), and @code{t} otherwise (which means the outer frame size never
1210+
changes implicitly when there's no window system support).
12131211

12141212
Note that when a frame is not large enough to accommodate a change of
12151213
any of the parameters listed above, Emacs may try to enlarge the frame
12161214
even if this option is non-@code{nil}.
1215+
1216+
Note also that window managers usually do not ask for resizing a frame
1217+
when they change the number of lines occupied by an external menu or
1218+
tool bar. Typically, such ``wrappings'' occur when a user shrinks a
1219+
frame horizontally, making it impossible to display all elements of
1220+
its menu or tool bar. They may also result from a change of the major
1221+
mode altering the number of items of a menu or tool bar. Any such
1222+
wrappings may implicitly alter the number of lines of a frame's text
1223+
area and are unaffected by the setting of this option.
12171224
@end defopt
12181225

12191226

doc/lispref/internals.texi

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,9 +1228,9 @@ the @var{runtime} structure with the value compiled into the module:
12281228

12291229
@example
12301230
int
1231-
emacs_module_init (struct emacs_runtime *ert)
1231+
emacs_module_init (struct emacs_runtime *runtime)
12321232
@{
1233-
if (ert->size < sizeof (*ert))
1233+
if (runtime->size < sizeof (*runtime))
12341234
return 1;
12351235
@}
12361236
@end example
@@ -1247,7 +1247,7 @@ assumes it is part of the @code{emacs_module_init} function shown
12471247
above:
12481248

12491249
@example
1250-
emacs_env *env = ert->get_environment (ert);
1250+
emacs_env *env = runtime->get_environment (runtime);
12511251
if (env->size < sizeof (*env))
12521252
return 2;
12531253
@end example
@@ -1264,7 +1264,7 @@ Emacs, by comparing the size of the environment passed by Emacs with
12641264
known sizes, like this:
12651265

12661266
@example
1267-
emacs_env *env = ert->get_environment (ert);
1267+
emacs_env *env = runtime->get_environment (runtime);
12681268
if (env->size >= sizeof (struct emacs_env_26))
12691269
emacs_version = 26; /* Emacs 26 or later. */
12701270
else if (env->size >= sizeof (struct emacs_env_25))
@@ -1388,7 +1388,7 @@ Combining the above steps, code that arranges for a C function
13881388
look like this, as part of the module initialization function:
13891389

13901390
@example
1391-
emacs_env *env = ert->get_environment (ert);
1391+
emacs_env *env = runtime->get_environment (runtime);
13921392
emacs_value func = env->make_function (env, min_arity, max_arity,
13931393
module_func, docstring, data);
13941394
emacs_value symbol = env->intern (env, "module-func");
@@ -1508,9 +1508,10 @@ overflow in the size calculation.
15081508
@end deftypefn
15091509

15101510
@deftp {Type alias} emacs_limb_t
1511-
This is an unsigned integer type,
1512-
used as the element type for the magnitude arrays for the big
1513-
integer conversion functions.
1511+
This is an unsigned integer type, used as the element type for the
1512+
magnitude arrays for the big integer conversion functions. The type
1513+
is guaranteed to have unique object representations, i.e., no padding
1514+
bits.
15141515
@end deftp
15151516

15161517
@defvr Macro EMACS_LIMB_MAX
@@ -1524,12 +1525,11 @@ This function returns the value of a Lisp float specified by
15241525
@var{arg}, as a C @code{double} value.
15251526
@end deftypefn
15261527

1527-
@deftypefn Function struct timespec extract_time (emacs_env *@var{env}, emacs_value @var{time})
1528-
This function, which is available since Emacs 27, interprets
1529-
@var{time} as an Emacs Lisp time value and returns the corresponding
1530-
@code{struct timespec}. @xref{Time of Day}. @code{struct timespec}
1531-
represents a timestamp with nanosecond precision. It has the
1532-
following members:
1528+
@deftypefn Function struct timespec extract_time (emacs_env *@var{env}, emacs_value @var{arg})
1529+
This function, which is available since Emacs 27, interprets @var{arg}
1530+
as an Emacs Lisp time value and returns the corresponding @code{struct
1531+
timespec}. @xref{Time of Day}. @code{struct timespec} represents a
1532+
timestamp with nanosecond precision. It has the following members:
15331533

15341534
@table @code
15351535
@item time_t tv_sec
@@ -1727,9 +1727,9 @@ next_prime (emacs_env *env, ptrdiff_t nargs, emacs_value *args,
17271727
@}
17281728
17291729
int
1730-
emacs_module_init (struct emacs_runtime *ert)
1730+
emacs_module_init (struct emacs_runtime *runtime)
17311731
@{
1732-
emacs_env *env = ert->get_environment (ert);
1732+
emacs_env *env = runtime->get_environment (runtime);
17331733
emacs_value symbol = env->intern (env, "next-prime");
17341734
emacs_value func
17351735
= env->make_function (env, 1, 1, next_prime, NULL, NULL);
@@ -1756,16 +1756,15 @@ there's no requirement that @var{time} be normalized. This means that
17561756
@code{@var{time}.tv_nsec} can be negative or larger than 999,999,999.
17571757
@end deftypefn
17581758

1759-
@deftypefn Function emacs_value make_string (emacs_env *@var{env}, const char *@var{str}, ptrdiff_t @var{strlen})
1759+
@deftypefn Function emacs_value make_string (emacs_env *@var{env}, const char *@var{str}, ptrdiff_t @var{len})
17601760
This function creates an Emacs string from C text string pointed by
17611761
@var{str} whose length in bytes, not including the terminating null
1762-
byte, is @var{strlen}. The original string in @var{str} can be either
1763-
an @acronym{ASCII} string or a UTF-8 encoded non-@acronym{ASCII}
1764-
string; it can include embedded null bytes, and doesn't have to end in
1765-
a terminating null byte at @code{@var{str}[@var{strlen}]}. The
1766-
function raises the @code{overflow-error} error condition if
1767-
@var{strlen} is negative or exceeds the maximum length of an Emacs
1768-
string.
1762+
byte, is @var{len}. The original string in @var{str} can be either an
1763+
@acronym{ASCII} string or a UTF-8 encoded non-@acronym{ASCII} string;
1764+
it can include embedded null bytes, and doesn't have to end in a
1765+
terminating null byte at @code{@var{str}[@var{len}]}. The function
1766+
raises the @code{overflow-error} error condition if @var{len} is
1767+
negative or exceeds the maximum length of an Emacs string.
17691768
@end deftypefn
17701769

17711770
The @acronym{API} does not provide functions to manipulate Lisp data
@@ -1822,25 +1821,27 @@ garbage-collected. Don't run any expensive code in a finalizer,
18221821
because GC must finish quickly to keep Emacs responsive.
18231822
@end deftypefn
18241823

1825-
@deftypefn Function void *get_user_ptr (emacs_env *@var{env}, emacs_value val)
1824+
@deftypefn Function void *get_user_ptr (emacs_env *@var{env}, emacs_value @var{arg})
18261825
This function extracts the C pointer from the Lisp object represented
1827-
by @var{val}.
1826+
by @var{arg}.
18281827
@end deftypefn
18291828

1830-
@deftypefn Function void set_user_ptr (emacs_env *@var{env}, emacs_value @var{value}, void *@var{ptr})
1829+
@deftypefn Function void set_user_ptr (emacs_env *@var{env}, emacs_value @var{arg}, void *@var{ptr})
18311830
This function sets the C pointer embedded in the @code{user-ptr}
1832-
object represented by @var{value} to @var{ptr}.
1831+
object represented by @var{arg} to @var{ptr}.
18331832
@end deftypefn
18341833

1835-
@deftypefn Function emacs_finalizer get_user_finalizer (emacs_env *@var{env}, emacs_value val)
1834+
@deftypefn Function emacs_finalizer get_user_finalizer (emacs_env *@var{env}, emacs_value @var{arg})
18361835
This function returns the finalizer of the @code{user-ptr} object
1837-
represented by @var{val}, or @code{NULL} if it doesn't have a finalizer.
1836+
represented by @var{arg}, or @code{NULL} if it doesn't have a
1837+
finalizer.
18381838
@end deftypefn
18391839

1840-
@deftypefn Function void set_user_finalizer (emacs_env *@var{env}, emacs_value @var{val}, emacs_finalizer @var{fin})
1840+
@deftypefn Function void set_user_finalizer (emacs_env *@var{env}, emacs_value @var{arg}, emacs_finalizer @var{fin})
18411841
This function changes the finalizer of the @code{user-ptr} object
1842-
represented by @var{val} to be @var{fin}. If @var{fin} is a
1843-
@code{NULL} pointer, the @code{user-ptr} object will have no finalizer.
1842+
represented by @var{arg} to be @var{fin}. If @var{fin} is a
1843+
@code{NULL} pointer, the @code{user-ptr} object will have no
1844+
finalizer.
18441845
@end deftypefn
18451846

18461847
@node Module Misc
@@ -1853,20 +1854,20 @@ be called via the @code{emacs_env} pointer. Description of functions
18531854
that were introduced after Emacs 25 calls out the first version where
18541855
they became available.
18551856

1856-
@deftypefn Function bool eq (emacs_env *@var{env}, emacs_value @var{val1}, emacs_value @var{val2})
1857+
@deftypefn Function bool eq (emacs_env *@var{env}, emacs_value @var{a}, emacs_value @var{b})
18571858
This function returns @code{true} if the Lisp objects represented by
1858-
@var{val1} and @var{val2} are identical, @code{false} otherwise. This
1859-
is the same as the Lisp function @code{eq} (@pxref{Equality
1860-
Predicates}), but avoids the need to intern the objects represented by
1861-
the arguments.
1859+
@var{a} and @var{b} are identical, @code{false} otherwise. This is
1860+
the same as the Lisp function @code{eq} (@pxref{Equality Predicates}),
1861+
but avoids the need to intern the objects represented by the
1862+
arguments.
18621863

18631864
There are no @acronym{API} functions for other equality predicates, so
18641865
you will need to use @code{intern} and @code{funcall}, described
18651866
below, to perform more complex equality tests.
18661867
@end deftypefn
18671868

1868-
@deftypefn Function bool is_not_nil (emacs_env *@var{env}, emacs_value @var{val})
1869-
This function tests whether the Lisp object represented by @var{val}
1869+
@deftypefn Function bool is_not_nil (emacs_env *@var{env}, emacs_value @var{arg})
1870+
This function tests whether the Lisp object represented by @var{arg}
18701871
is non-@code{nil}; it returns @code{true} or @code{false} accordingly.
18711872

18721873
Note that you could implement an equivalent test by using
@@ -1875,12 +1876,12 @@ then use @code{eq}, described above, to test for equality. But using
18751876
this function is more convenient.
18761877
@end deftypefn
18771878

1878-
@deftypefn Function emacs_value type_of (emacs_env *@var{env}, emacs_value @code{object})
1879-
This function returns the type of @var{object} as a value that
1880-
represents a symbol: @code{string} for a string, @code{integer} for an
1881-
integer, @code{process} for a process, etc. @xref{Type Predicates}.
1882-
You can use @code{intern} and @code{eq} to compare against known type
1883-
symbols, if your code needs to depend on the object type.
1879+
@deftypefn Function emacs_value type_of (emacs_env *@var{env}, emacs_value @code{arg})
1880+
This function returns the type of @var{arg} as a value that represents
1881+
a symbol: @code{string} for a string, @code{integer} for an integer,
1882+
@code{process} for a process, etc. @xref{Type Predicates}. You can
1883+
use @code{intern} and @code{eq} to compare against known type symbols,
1884+
if your code needs to depend on the object type.
18841885
@end deftypefn
18851886

18861887
@anchor{intern}
@@ -2054,11 +2055,12 @@ One use of this function is when you want to re-throw a non-local exit
20542055
from one of the called @acronym{API} or Lisp functions.
20552056
@end deftypefn
20562057

2057-
@deftypefn Function void non_local_exit_signal (emacs_env *@var{env}, emacs_value @var{error}, emacs_value @var{data})
2058-
This function signals the error represented by @var{error} with the
2059-
specified error data @var{data}. The module function should return
2060-
soon after calling this function. This function could be useful,
2061-
e.g., for signaling errors from module functions to Emacs.
2058+
@deftypefn Function void non_local_exit_signal (emacs_env *@var{env}, emacs_value @var{symbol}, emacs_value @var{data})
2059+
This function signals the error represented by the error symbol
2060+
@var{symbol} with the specified error data @var{data}. The module
2061+
function should return soon after calling this function. This
2062+
function could be useful, e.g., for signaling errors from module
2063+
functions to Emacs.
20622064
@end deftypefn
20632065

20642066

0 commit comments

Comments
 (0)