summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2023-05-10 11:18:43 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2023-05-10 11:18:43 -0400
commite4c8ba6c0589f1ba0ba9993c4f1e9c0821d3ca6c (patch)
treed360934aa96f088100c3a38acefa69460638d877 /src
parentdf620591e8cd5d2733659e9c43e97779b0cb8ec5 (diff)
parent09bf4768360dd5b8928f90b0b1437f3f5ee43c41 (diff)
downloademacs-e4c8ba6c0589f1ba0ba9993c4f1e9c0821d3ca6c.tar.gz
Merge branch 'emacs-29'
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c2
-rw-r--r--src/fontset.c9
-rw-r--r--src/xdisp.c12
3 files changed, 20 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c
index d09fc41dec6..6391ede8d0a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -398,7 +398,7 @@ static ptrdiff_t pure_bytes_used_non_lisp;
/* If positive, garbage collection is inhibited. Otherwise, zero. */
-static intptr_t garbage_collection_inhibited;
+intptr_t garbage_collection_inhibited;
/* The GC threshold in bytes, the last time it was calculated
from gc-cons-threshold and gc-cons-percentage. */
diff --git a/src/fontset.c b/src/fontset.c
index f196dee8259..c0e00cfa346 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -967,6 +967,15 @@ face_for_char (struct frame *f, struct face *face, int c,
#endif
}
+ /* If the parent face has no fontset we could work with, and has no
+ font, just return that same face, so that the caller will
+ consider the character to have no font capable of displaying it,
+ and display it as "glyphless". That is certainly better than
+ violating the assertion below or crashing when assertions are not
+ compiled in. */
+ if (face->fontset < 0 && !face->font)
+ return face->id;
+
eassert (fontset_id_valid_p (face->fontset));
fontset = FONTSET_FROM_ID (face->fontset);
eassert (!BASE_FONTSET_P (fontset));
diff --git a/src/xdisp.c b/src/xdisp.c
index 2817fc45993..28f8e8128c5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12825,6 +12825,8 @@ truncate_message_1 (void *a1, Lisp_Object a2)
return false;
}
+extern intptr_t garbage_collection_inhibited;
+
/* Set the current message to STRING. */
static void
@@ -12834,7 +12836,11 @@ set_message (Lisp_Object string)
eassert (STRINGP (string));
- if (FUNCTIONP (Vset_message_function))
+ if (FUNCTIONP (Vset_message_function)
+ /* FIXME: (bug#63253) We should really make the regexp engine re-entrant,
+ but in the mean time, let's ignore `set-message-function` when
+ called from `probably_quit`. */
+ && !garbage_collection_inhibited)
{
specpdl_ref count = SPECPDL_INDEX ();
specbind (Qinhibit_quit, Qt);
@@ -12911,7 +12917,9 @@ clear_message (bool current_p, bool last_displayed_p)
if (current_p)
{
- if (FUNCTIONP (Vclear_message_function))
+ if (FUNCTIONP (Vclear_message_function)
+ /* FIXME: (bug#63253) Same as for `set-message-function` above. */
+ && !garbage_collection_inhibited)
{
specpdl_ref count = SPECPDL_INDEX ();
specbind (Qinhibit_quit, Qt);