1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Merge from origin/emacs-26

54fb383 (origin/emacs-26) Fix detection of freed emacs_values (Bug#32...
769d0cd ; Fix out-of-tree build for mod-test.so
9a1329e Avoid crashes with very wide TTY frames on MS-Windows
9a613d3 Prevent `modify-file-local-variable-prop-line' from adding ex...
624e7dc Update GNOME bugtracker URLs
51ef6d5 Clarify in the Emacs manual that ChangeLog files are not used
6e08019 Recognize codepage 65001 as a valid encoding
1a350d7 ; * etc/NEWS: Fix format of first lines of some entries.
22d1f53 Avoid compilation warning in nt/addpm.c
7bc9ce7 Fix duplicate custom group names in bibtex.el
a9cf938 Fix outdated text in the Calc manual

Conflicts:
	etc/NEWS
	etc/PROBLEMS
	src/emacs-module.c
	src/gtkutil.c
	src/image.c
	src/xterm.c
	test/Makefile.in
This commit is contained in:
Glenn Morris 2018-08-26 15:10:50 -07:00
commit 1afd313334
13 changed files with 110 additions and 58 deletions

View File

@ -1162,11 +1162,11 @@ name that indicates whether it is the old version or your new changed
one.
@item
Write the change log entries for your changes. This is both to save us
Write the commit log entries for your changes. This is both to save us
the extra work of writing them, and to help explain your changes so we
can understand them.
The purpose of the change log is to show people where to find what was
The purpose of the commit log is to show people where to find what was
changed. So you need to be specific about what functions you changed;
in large functions, it's often helpful to indicate where within the
function the change was.
@ -1177,9 +1177,9 @@ new function, all you need to say about it is that it is new. If you
feel that the purpose needs explaining, it probably does---but put the
explanation in comments in the code. It will be more useful there.
Please look at the change log entries of recent commits to see what
sorts of information to put in, and to learn the style that we use. Note that,
unlike some other projects, we do require change logs for
Please look at the commit log entries of recent commits to see what
sorts of information to put in, and to learn the style that we use.
Note that, unlike some other projects, we do require commit logs for
documentation, i.e., Texinfo files.
@xref{Change Log},
@ifset WWW_GNU_ORG

View File

@ -33275,19 +33275,18 @@ prefer them, or if you are calling these functions from regular Lisp.
The functions described here are scattered throughout the various
Calc component files. Note that @file{calc.el} includes @code{autoload}s
for only a few component files; when Calc wants to call an advanced
function it calls @samp{(calc-extensions)} first; this function
autoloads @file{calc-ext.el}, which in turn autoloads all the functions
in the remaining component files.
for only a few component files; to get autoloads of the more advanced
function, one needs to load @file{calc-ext.el}, which in turn
autoloads all the functions in the remaining component files.
Because @code{defmath} itself uses the extensions, user-written code
generally always executes with the extensions already loaded, so
normally you can use any Calc function and be confident that it will
be autoloaded for you when necessary. If you are doing something
special, check carefully to make sure each function you are using is
from @file{calc.el} or its components, and call @samp{(calc-extensions)}
before using any function based in @file{calc-ext.el} if you can't
prove this file will already be loaded.
from @file{calc.el} or its components, and use @w{@code{(require
'calc-ext)}} before using any function based in @file{calc-ext.el} if
you can't prove this file will already be loaded.
@menu
* Data Type Formats::

View File

@ -19,7 +19,7 @@ with a prefix argument or by typing C-u C-h C-n.
* Installation Changes in Emacs 26.2
---
** Building Emacs with the '--with-xwidgets' option now requires WebKit2
** Building Emacs with the '--with-xwidgets' option now requires WebKit2.
To build Emacs with xwidgets support, you will need to install the
webkit2gtk-4.0 package; version 2.12 or later is required.
(This change was actually made in Emacs 26.1, but was not called out
@ -132,17 +132,17 @@ now the default in developer builds. As before, use
** When GCC warnings are enabled, '--enable-check-lisp-object-type' is
now enabled by default when configuring.
** The Emacs server now has socket-launching support. This allows
socket based activation, where an external process like systemd can
invoke the Emacs server process upon a socket connection event and
hand the socket over to Emacs. Emacs uses this socket to service
emacsclient commands. This new functionality can be disabled with the
configure option '--disable-libsystemd'.
** The Emacs server now has socket-launching support.
This allows socket based activation, where an external process like
systemd can invoke the Emacs server process upon a socket connection
event and hand the socket over to Emacs. Emacs uses this socket to
service emacsclient commands. This new functionality can be disabled
with the configure option '--disable-libsystemd'.
** A systemd user unit file is provided. Use it in the standard way:
'systemctl --user enable emacs'.
(If your Emacs is installed in a non-standard location, you may
need to copy the emacs.service file to eg ~/.config/systemd/user/)
** A systemd user unit file is provided.
Use it in the standard way: 'systemctl --user enable emacs'. (If your
Emacs is installed in a non-standard location, you may need to copy
the emacs.service file to eg ~/.config/systemd/user/)
** New configure option '--disable-build-details' attempts to build an
Emacs that is more likely to be reproducible; that is, if you build
@ -153,7 +153,6 @@ following variables nil: 'emacs-build-system', 'emacs-build-time',
'erc-emacs-build-time'.
** Emacs can now be built with support for Little CMS.
If the lcms2 library is installed, Emacs will enable features built on
top of that library. The new configure option '--without-lcms2' can
be used to build without lcms2 support even if it is installed. Emacs
@ -196,9 +195,9 @@ The effect is similar to that of "toolBar" resource on the tool bar.
* Changes in Emacs 26.1
** Option 'buffer-offer-save' can be set to new value, 'always'. When
set to 'always', the command 'save-some-buffers' will always offer
this buffer for saving.
** Option 'buffer-offer-save' can be set to new value, 'always'.
When set to 'always', the command 'save-some-buffers' will always
offer this buffer for saving.
** Security vulnerability related to Enriched Text mode is removed.
@ -684,7 +683,7 @@ This can be customized via the 'info-menu' category in
A new option 'ediff-show-ancestor' and a new toggle
'ediff-toggle-show-ancestor'.
** TeX: Add luatex and xetex as alternatives to pdftex
** TeX: Add luatex and xetex as alternatives to pdftex.
** Electric-Buffer-menu
@ -1088,7 +1087,6 @@ to a format suitable for reverse lookup zone files.
** Ispell
*** Enchant is now supported as a spell-checker.
Enchant is a meta-spell-checker that uses providers such as Hunspell
to do the actual checking. With it, users can use spell-checkers not
directly supported by Emacs, such as Voikko, Hspell and AppleSpell,
@ -1098,8 +1096,7 @@ configure different spelling-checkers for different languages.
** Flymake
*** Flymake has been completely redesigned
*** Flymake has been completely redesigned.
Flymake now annotates arbitrary buffer regions, not just lines. It
supports arbitrary diagnostic types, not just errors and warnings (see
variable 'flymake-diagnostic-types-alist').
@ -1115,7 +1112,6 @@ backend", which has been updated to benefit from the new UI features.
** Term
*** 'term-char-mode' now makes its buffer read-only.
The buffer is made read-only to prevent changes from being made by
anything other than the process filter; and movements of point away
from the process mark are counter-acted so that the cursor is in the
@ -1131,7 +1127,6 @@ the previous behavior.
** Xref
*** When an *xref* buffer is needed, 'TAB' quits and jumps to an xref.
A new command 'xref-quit-and-goto-xref', bound to 'TAB' in *xref*
buffers, quits the window before jumping to the destination. In many
situations, the intended window configuration is restored, just as if
@ -1227,11 +1222,11 @@ change FOO, respectively. The exhaustive list of removed variables is:
*** Many variables obsoleted in 22.1 referring to face symbols.
** The variable 'text-quoting-style' is now a customizable option. It
controls whether to and how to translate ASCII quotes in messages and
help output. Its possible values and their semantics remain unchanged
from Emacs 25. In particular, when this variable's value is 'grave',
all quotes in formats are output as-is.
** The variable 'text-quoting-style' is now a customizable option.
It controls whether to and how to translate ASCII quotes in messages
and help output. Its possible values and their semantics remain
unchanged from Emacs 25. In particular, when this variable's value is
'grave', all quotes in formats are output as-is.
** Functions like 'check-declare-file' and 'check-declare-directory'
now generate less chatter and more-compact diagnostics. The auxiliary
@ -1495,10 +1490,11 @@ to provide region boundaries (for rectangular regions more than one)
to an interactively callable function as a single argument instead of
two separate arguments 'region-beginning' and 'region-end'.
** 'parse-partial-sexp' state has a new element. Element 10 is
non-nil when the last character scanned might be the first character
of a two character construct, i.e., a comment delimiter or escaped
character. Its value is the syntax of that last character.
** 'parse-partial-sexp' state has a new element.
Element 10 is non-nil when the last character scanned might be the
first character of a two character construct, i.e., a comment
delimiter or escaped character. Its value is the syntax of that last
character.
** 'parse-partial-sexp's state, element 9, has now been confirmed as
permanent and documented, and may be used by Lisp programs. Its value
@ -1762,8 +1758,9 @@ the ELisp manual.
*** 'select-frame-by-name' now may return a frame on another display
if it does not find a suitable one on the current display.
** 'tcl-auto-fill-mode' is now declared obsolete. Its functionality
can be replicated simply by setting 'comment-auto-fill-only-comments'.
** 'tcl-auto-fill-mode' is now declared obsolete.
Its functionality can be replicated simply by setting
'comment-auto-fill-only-comments'.
** New pcase pattern 'rx' to match against an rx-style regular expression.
For details, see the doc string of 'rx--pcase-macroexpander'.

View File

@ -1135,7 +1135,7 @@ is running. If gnome-settings-daemon is not running, Emacs receives
input through XIM without any problem. Furthermore, this seems only
to happen in *.UTF-8 locales; zh_CN.GB2312 and zh_CN.GBK locales, for
example, work fine. A bug report has been filed in the Gnome
bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=357032
bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=357032
*** Gnome: GPaste clipboard manager causes erratic behavior of 'yank'

View File

@ -377,7 +377,9 @@ from the -*- line ignoring the input argument VALUE."
((eq variable 'mode) (goto-char beg))
((null replaced-pos) (goto-char end))
(replaced-pos (goto-char replaced-pos)))
(if (and (not (eq (char-before) ?\;))
(if (and (save-excursion
(skip-chars-backward " \t")
(not (eq (char-before) ?\;)))
(not (equal (point) (marker-position beg)))
;; When existing `-*- -*-' is empty, beg > end.
(not (> (marker-position beg) (marker-position end))))

View File

@ -1304,6 +1304,11 @@ is treated as a character."
:bom '(utf-8-with-signature . utf-8))
(define-coding-system-alias 'mule-utf-8 'utf-8)
;; See this page:
;; https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers
;; Starting with Windows 10, people are trying to set their systems to
;; use UTF-8 , so we had better recognized this alias:
(define-coding-system-alias 'cp65001 'utf-8)
(define-coding-system 'utf-8-emacs
"Support for all Emacs characters (including non-Unicode characters)."

View File

@ -457,7 +457,7 @@ INIT is either the initial content of the field or a function,
which is called to determine the initial content of the field.
ALTERNATIVE if non-nil is an integer that numbers sets of
alternatives, starting from zero."
:group 'BibTeX
:group 'bibtex
:version "26.1" ; add Conference
:type 'bibtex-entry-alist)
(put 'bibtex-BibTeX-entry-alist 'risky-local-variable t)

View File

@ -38,9 +38,12 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <malloc.h>
/* MinGW64 barfs if _WIN32_IE is defined to anything below 0x500. */
/* MinGW64 barfs if _WIN32_IE is defined to anything below 0x0500. */
#ifndef MINGW_W64
#define _WIN32_IE 0x400
# ifdef _WIN32_IE
# undef _WIN32_IE
# endif
#define _WIN32_IE 0x0400
#endif
/* Request C Object macros for COM interfaces. */
#define COBJMACROS 1

View File

@ -344,20 +344,20 @@ module_free_global_ref (emacs_env *env, emacs_value ref)
Lisp_Object globals = global_env_private.values;
Lisp_Object prev = Qnil;
ptrdiff_t count = 0;
for (Lisp_Object tail = global_env_private.values; CONSP (tail);
for (Lisp_Object tail = globals; CONSP (tail);
tail = XCDR (tail))
{
emacs_value global = xmint_pointer (XCAR (globals));
emacs_value global = xmint_pointer (XCAR (tail));
if (global == ref)
{
if (NILP (prev))
global_env_private.values = XCDR (globals);
else
XSETCDR (prev, XCDR (globals));
XSETCDR (prev, XCDR (tail));
return;
}
++count;
prev = globals;
prev = tail;
}
module_abort ("Global value was not found in list of %"pD"d globals",
count);

View File

@ -140,23 +140,36 @@ w32con_clear_frame (struct frame *f)
}
static struct glyph glyph_base[256];
static struct glyph glyph_base[80];
static struct glyph *glyphs = glyph_base;
static size_t glyphs_len = ARRAYELTS (glyph_base);
static BOOL ceol_initialized = FALSE;
/* Clear from Cursor to end (what's "standout marker"?). */
static void
w32con_clear_end_of_line (struct frame *f, int end)
{
/* Time to reallocate our "empty row"? With today's large screens,
it is not unthinkable to see TTY frames well in excess of
80-character width. */
if (end - cursor_coords.X > glyphs_len)
{
if (glyphs == glyph_base)
glyphs = NULL;
glyphs = xrealloc (glyphs, FRAME_COLS (f) * sizeof (struct glyph));
glyphs_len = FRAME_COLS (f);
ceol_initialized = FALSE;
}
if (!ceol_initialized)
{
int i;
for (i = 0; i < 256; i++)
for (i = 0; i < glyphs_len; i++)
{
memcpy (&glyph_base[i], &space_glyph, sizeof (struct glyph));
memcpy (&glyphs[i], &space_glyph, sizeof (struct glyph));
}
ceol_initialized = TRUE;
}
w32con_write_glyphs (f, glyph_base, end - cursor_coords.X); /* fencepost ? */
w32con_write_glyphs (f, glyphs, end - cursor_coords.X);
}
/* Insert n lines at vpos. if n is negative delete -n lines. */
@ -772,6 +785,15 @@ initialize_w32_display (struct terminal *term, int *width, int *height)
*width = 1 + info.srWindow.Right - info.srWindow.Left;
}
/* Force reinitialization of the "empty row" buffer, in case they
dumped from a running session. */
if (glyphs != glyph_base)
{
glyphs = NULL;
glyphs_len = 0;
ceol_initialized = FALSE;
}
if (os_subtype == OS_NT)
w32_console_unicode_input = 1;
else

View File

@ -246,12 +246,14 @@ else
FPIC_CFLAGS = -fPIC
endif
# Note: emacs-module.h is generated from emacs-module.h.in, hence we
# look in ../src, not $(srcdir)/../src.
MODULE_CFLAGS = -I../src $(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
test_module = $(test_module_dir)/mod-test${SO}
src/emacs-module-tests.log: $(test_module)
$(test_module): $(test_module:${SO}=.c) $(srcdir)/../src/emacs-module.h
$(test_module): $(test_module:${SO}=.c) ../src/emacs-module.h
$(AM_V_at)${MKDIR_P} $(dir $@)
$(AM_V_CCLD)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \
-o $@ $<

View File

@ -156,6 +156,24 @@ Fmod_test_globref_make (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
return env->make_global_ref (env, lisp_str);
}
/* Create a few global references from arguments and free them. */
static emacs_value
Fmod_test_globref_free (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
void *data)
{
emacs_value refs[10];
for (int i = 0; i < 10; i++)
{
refs[i] = env->make_global_ref (env, args[i % nargs]);
}
for (int i = 0; i < 10; i++)
{
env->free_global_ref (env, refs[i]);
}
return env->intern (env, "ok");
}
/* Return a copy of the argument string where every 'a' is replaced
with 'b'. */
@ -339,6 +357,7 @@ emacs_module_init (struct emacs_runtime *ert)
DEFUN ("mod-test-non-local-exit-funcall", Fmod_test_non_local_exit_funcall,
1, 1, NULL, NULL);
DEFUN ("mod-test-globref-make", Fmod_test_globref_make, 0, 0, NULL, NULL);
DEFUN ("mod-test-globref-free", Fmod_test_globref_free, 4, 4, NULL, NULL);
DEFUN ("mod-test-string-a-to-b", Fmod_test_string_a_to_b, 1, 1, NULL, NULL);
DEFUN ("mod-test-userptr-make", Fmod_test_userptr_make, 1, 1, NULL, NULL);
DEFUN ("mod-test-userptr-get", Fmod_test_userptr_get, 1, 1, NULL, NULL);

View File

@ -148,6 +148,9 @@ changes."
(garbage-collect) ;; XXX: not enough to really test but it's something..
(should (string= ref-str mod-str))))
(ert-deftest mod-test-globref-free-test ()
(should (eq (mod-test-globref-free 1 'a "test" 'b) 'ok)))
(ert-deftest mod-test-string-a-to-b-test ()
(should (string= (mod-test-string-a-to-b "aaa") "bbb")))