]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tty root frame collection in redisplay_internal
authorGerd Möllmann <gerd@gnu.org>
Fri, 20 Dec 2024 05:11:18 +0000 (06:11 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:17:35 +0000 (16:17 +0100)
* 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.

(cherry picked from commit 42ab0f162cb37eeddae53675fba310b8a22ff934)

src/fns.c
src/lisp.h
src/xdisp.c

index 8b645e5a146a5719503ee67171c7be684b2677eb..a38add919fcbfc48b07d2bf8681cad883369c8d1 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -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.  */)
index 832a1755c047897dc07c9e151da724bc1bcc4f7b..bf6b023fc2a27be34d7c8107cd8a9a156ec2c38a 100644 (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,
index 50d6ced5f8ee14fbd1075997f07a54072fb8bc38..64d5ac1fc3c65a851b2e6bc00bb7296338675781 100644 (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);
            }