Merge from origin/emacs-28

7078f32b5b Fix crash when dumping charset_table with portable dumper ...
a4fcbf46a7 ; etc/NEWS: Move the note about Xref EIEIO change to the p...
f88c1d222f Remove maintainer comment from Emacs 28 module snippet.

# Conflicts:
#	etc/NEWS
This commit is contained in:
Stefan Kangas 2021-12-15 06:30:41 +01:00
commit 92ed2fe688
4 changed files with 18 additions and 17 deletions

View file

@ -1011,20 +1011,6 @@ file:
(add-hook 'foo-mode-hook (lambda () (auto-fill-mode -1))
** Xref migrated from EIEIO to cl-defstruct for its core objects.
This means that 'oref' and 'with-slots' no longer works on them, and
'make-instance' can no longer be used to create those instances (which
wasn't recommended anyway). Packages should restrict themselves to
using functions like 'xref-make', 'xref-make-match',
'xref-make-*-location', as well as accessor functions
'xref-item-summary' and 'xref-item-location'.
Among the benefits are better performance (noticeable when there are a
lot of matches) and improved flexibility: 'xref-match-item' instances
do not require that 'location' inherits from 'xref-location' anymore
(that class was removed), so packages can create new location types to
use with "match items" without adding EIEIO as a dependency.
* Editing Changes in Emacs 28.1
@ -3724,6 +3710,20 @@ user option has been renamed to 'find-library-source-path', and
---
** The macro 'vc-call' no longer evaluates its second argument twice.
** Xref migrated from EIEIO to cl-defstruct for its core objects.
This means that 'oref' and 'with-slots' no longer works on them, and
'make-instance' can no longer be used to create those instances (which
wasn't recommended anyway). Packages should restrict themselves to
using functions like 'xref-make', 'xref-make-match',
'xref-make-*-location', as well as accessor functions
'xref-item-summary' and 'xref-item-location'.
Among the benefits are better performance (noticeable when there are a
lot of matches) and improved flexibility: 'xref-match-item' instances
do not require that 'location' inherits from 'xref-location' anymore
(that class was removed), so packages can create new location types to
use with "match items" without adding EIEIO as a dependency.
* Lisp Changes in Emacs 28.1

View file

@ -63,7 +63,7 @@ Lisp_Object Vcharset_hash_table;
/* Table of struct charset. */
struct charset *charset_table;
int charset_table_size;
static int charset_table_used;
int charset_table_used;
/* Special charsets corresponding to symbols. */
int charset_ascii;

View file

@ -249,6 +249,7 @@ extern Lisp_Object Vcharset_hash_table;
/* Table of struct charset. */
extern struct charset *charset_table;
extern int charset_table_size;
extern int charset_table_used;
#define CHARSET_FROM_ID(id) (charset_table + (id))

View file

@ -3177,7 +3177,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
DUMP_FIELD_COPY (&out, cs, hash_index);
DUMP_FIELD_COPY (&out, cs, dimension);
memcpy (out.code_space, &cs->code_space, sizeof (cs->code_space));
if (cs->code_space_mask)
if (cs_i < charset_table_used && cs->code_space_mask)
dump_field_fixup_later (ctx, &out, cs, &cs->code_space_mask);
DUMP_FIELD_COPY (&out, cs, code_linear_p);
DUMP_FIELD_COPY (&out, cs, iso_chars_96);
@ -3198,7 +3198,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
memcpy (out.fast_map, &cs->fast_map, sizeof (cs->fast_map));
DUMP_FIELD_COPY (&out, cs, code_offset);
dump_off offset = dump_object_finish (ctx, &out, sizeof (out));
if (cs->code_space_mask)
if (cs_i < charset_table_used && cs->code_space_mask)
dump_remember_cold_op (ctx, COLD_OP_CHARSET,
Fcons (dump_off_to_lisp (cs_i),
dump_off_to_lisp (offset)));