1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 20:32:00 -08:00

Fix tty root frame collection in redisplay_internal

* src/fns.c (memq_no_quit): New function.
* src/lisp.h: Declare it.
* src/xdisp.c (redisplay_internal): Use memq_no_quit instead of
assq_no_quit.
This commit is contained in:
Gerd Möllmann 2024-12-20 06:11:18 +01:00
parent 3cb86eb038
commit 42ab0f162c
3 changed files with 11 additions and 1 deletions

View file

@ -1924,6 +1924,15 @@ The value is actually the tail of LIST whose car is ELT. */)
return Qnil;
}
Lisp_Object
memq_no_quit (Lisp_Object elt, Lisp_Object list)
{
for (; CONSP (list); list = XCDR (list))
if (EQ (XCAR (list), elt))
return list;
return Qnil;
}
DEFUN ("memql", Fmemql, Smemql, 2, 2, 0,
doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `eql'.
The value is actually the tail of LIST whose car is ELT. */)

View file

@ -4340,6 +4340,7 @@ extern Lisp_Object plist_put (Lisp_Object plist, Lisp_Object prop,
extern Lisp_Object plist_member (Lisp_Object plist, Lisp_Object prop);
extern void syms_of_fns (void);
extern void mark_fns (void);
Lisp_Object memq_no_quit (Lisp_Object elt, Lisp_Object list);
/* Defined in sort.c */
extern void tim_sort (Lisp_Object, Lisp_Object, Lisp_Object *, const ptrdiff_t,

View file

@ -17455,7 +17455,7 @@ redisplay_internal (void)
/* Remember tty root frames which we've seen. */
if (!FRAME_PARENT_FRAME (f)
&& NILP (assq_no_quit (frame, tty_root_frames)))
&& NILP (memq_no_quit (frame, tty_root_frames)))
tty_root_frames = Fcons (frame, tty_root_frames);
}