diff options
| author | Eli Zaretskii | 2024-04-16 15:12:42 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-04-16 15:12:42 +0300 |
| commit | 1be21dd95388037cfb71474a1fbd2a7d3583a80a (patch) | |
| tree | ba9a39b35320d6524e6e1deeb3352132614f0f6f | |
| parent | 9a673c6914d4ab39139a91e892089dac70206cd2 (diff) | |
| download | emacs-1be21dd95388037cfb71474a1fbd2a7d3583a80a.tar.gz emacs-1be21dd95388037cfb71474a1fbd2a7d3583a80a.zip | |
Minor fix in detecting recursive redisplay invocations
* src/xdisp.c (redisplay_internal): Detect recursive invocations
earlier. (Bug#66416)
| -rw-r--r-- | src/xdisp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index b154211cc3c..f8c8d763c5b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -16863,6 +16863,13 @@ redisplay_internal (void) | |||
| 16863 | 16863 | ||
| 16864 | redisplay_trace ("redisplay_internal %d\n", redisplaying_p); | 16864 | redisplay_trace ("redisplay_internal %d\n", redisplaying_p); |
| 16865 | 16865 | ||
| 16866 | /* I don't think this happens but let's be paranoid. In particular, | ||
| 16867 | this was observed happening when Emacs shuits down to to losing X | ||
| 16868 | connection, in which case accessing SELECTED_FRAME and the frame | ||
| 16869 | structure is likely to barf. */ | ||
| 16870 | if (redisplaying_p) | ||
| 16871 | return; | ||
| 16872 | |||
| 16866 | /* No redisplay if running in batch mode or frame is not yet fully | 16873 | /* No redisplay if running in batch mode or frame is not yet fully |
| 16867 | initialized, or redisplay is explicitly turned off by setting | 16874 | initialized, or redisplay is explicitly turned off by setting |
| 16868 | Vinhibit_redisplay. */ | 16875 | Vinhibit_redisplay. */ |
| @@ -16890,10 +16897,6 @@ redisplay_internal (void) | |||
| 16890 | return; | 16897 | return; |
| 16891 | #endif | 16898 | #endif |
| 16892 | 16899 | ||
| 16893 | /* I don't think this happens but let's be paranoid. */ | ||
| 16894 | if (redisplaying_p) | ||
| 16895 | return; | ||
| 16896 | |||
| 16897 | /* Record a function that clears redisplaying_p | 16900 | /* Record a function that clears redisplaying_p |
| 16898 | when we leave this function. */ | 16901 | when we leave this function. */ |
| 16899 | specpdl_ref count = SPECPDL_INDEX (); | 16902 | specpdl_ref count = SPECPDL_INDEX (); |