diff options
| author | Gerd Möllmann | 2024-12-20 06:11:18 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2024-12-20 06:13:13 +0100 |
| commit | 42ab0f162cb37eeddae53675fba310b8a22ff934 (patch) | |
| tree | 805a0b2509eacc52f059b132d2d86186e417b2c4 | |
| parent | 3cb86eb0385b8d5edba3dea495bc086c009614b7 (diff) | |
| download | emacs-42ab0f162cb37eeddae53675fba310b8a22ff934.tar.gz emacs-42ab0f162cb37eeddae53675fba310b8a22ff934.zip | |
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.
| -rw-r--r-- | src/fns.c | 9 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
3 files changed, 11 insertions, 1 deletions
| @@ -1924,6 +1924,15 @@ The value is actually the tail of LIST whose car is ELT. */) | |||
| 1924 | return Qnil; | 1924 | return Qnil; |
| 1925 | } | 1925 | } |
| 1926 | 1926 | ||
| 1927 | Lisp_Object | ||
| 1928 | memq_no_quit (Lisp_Object elt, Lisp_Object list) | ||
| 1929 | { | ||
| 1930 | for (; CONSP (list); list = XCDR (list)) | ||
| 1931 | if (EQ (XCAR (list), elt)) | ||
| 1932 | return list; | ||
| 1933 | return Qnil; | ||
| 1934 | } | ||
| 1935 | |||
| 1927 | DEFUN ("memql", Fmemql, Smemql, 2, 2, 0, | 1936 | DEFUN ("memql", Fmemql, Smemql, 2, 2, 0, |
| 1928 | doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `eql'. | 1937 | doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `eql'. |
| 1929 | The value is actually the tail of LIST whose car is ELT. */) | 1938 | The value is actually the tail of LIST whose car is ELT. */) |
diff --git a/src/lisp.h b/src/lisp.h index 832a1755c04..bf6b023fc2a 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -4340,6 +4340,7 @@ extern Lisp_Object plist_put (Lisp_Object plist, Lisp_Object prop, | |||
| 4340 | extern Lisp_Object plist_member (Lisp_Object plist, Lisp_Object prop); | 4340 | extern Lisp_Object plist_member (Lisp_Object plist, Lisp_Object prop); |
| 4341 | extern void syms_of_fns (void); | 4341 | extern void syms_of_fns (void); |
| 4342 | extern void mark_fns (void); | 4342 | extern void mark_fns (void); |
| 4343 | Lisp_Object memq_no_quit (Lisp_Object elt, Lisp_Object list); | ||
| 4343 | 4344 | ||
| 4344 | /* Defined in sort.c */ | 4345 | /* Defined in sort.c */ |
| 4345 | extern void tim_sort (Lisp_Object, Lisp_Object, Lisp_Object *, const ptrdiff_t, | 4346 | extern void tim_sort (Lisp_Object, Lisp_Object, Lisp_Object *, const ptrdiff_t, |
diff --git a/src/xdisp.c b/src/xdisp.c index 91db3a87aae..ceb727d1135 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -17455,7 +17455,7 @@ redisplay_internal (void) | |||
| 17455 | 17455 | ||
| 17456 | /* Remember tty root frames which we've seen. */ | 17456 | /* Remember tty root frames which we've seen. */ |
| 17457 | if (!FRAME_PARENT_FRAME (f) | 17457 | if (!FRAME_PARENT_FRAME (f) |
| 17458 | && NILP (assq_no_quit (frame, tty_root_frames))) | 17458 | && NILP (memq_no_quit (frame, tty_root_frames))) |
| 17459 | tty_root_frames = Fcons (frame, tty_root_frames); | 17459 | tty_root_frames = Fcons (frame, tty_root_frames); |
| 17460 | } | 17460 | } |
| 17461 | 17461 | ||