diff options
| author | Dmitry Antipov | 2013-08-15 19:37:03 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-15 19:37:03 +0400 |
| commit | 42fe2e88d62c3ff866317f3252f1e78ed0b066a2 (patch) | |
| tree | bf0c8d16a29b1990a49d7006f819daff0854082b /src | |
| parent | 0542623943803e346aec839369e399e4b0ff43ad (diff) | |
| download | emacs-42fe2e88d62c3ff866317f3252f1e78ed0b066a2.tar.gz emacs-42fe2e88d62c3ff866317f3252f1e78ed0b066a2.zip | |
Fix infinite frame selection loop (Bug#15025).
* frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/frame.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 77c37864b00..888db1f8cf4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | Fix infinite frame selection loop (Bug#15025). | ||
| 4 | * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame. | ||
| 5 | |||
| 1 | 2013-08-15 Eli Zaretskii <eliz@gnu.org> | 6 | 2013-08-15 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * xdisp.c (compute_window_start_on_continuation_line): When | 8 | * xdisp.c (compute_window_start_on_continuation_line): When |
diff --git a/src/frame.c b/src/frame.c index bb44f3cc987..957f08b06c5 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1199,8 +1199,15 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1199 | { | 1199 | { |
| 1200 | Lisp_Object tail, frame1; | 1200 | Lisp_Object tail, frame1; |
| 1201 | 1201 | ||
| 1202 | /* Look for another visible frame on the same terminal. */ | 1202 | /* Look for another visible frame on the same terminal. |
| 1203 | frame1 = next_frame (frame, Qvisible); | 1203 | Do not call next_frame here because it may loop forever. |
| 1204 | See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15025. */ | ||
| 1205 | FOR_EACH_FRAME (tail, frame1) | ||
| 1206 | if (!EQ (frame, frame1) | ||
| 1207 | && (FRAME_TERMINAL (XFRAME (frame)) | ||
| 1208 | == FRAME_TERMINAL (XFRAME (frame1))) | ||
| 1209 | && FRAME_VISIBLE_P (XFRAME (frame1))) | ||
| 1210 | break; | ||
| 1204 | 1211 | ||
| 1205 | /* If there is none, find *some* other frame. */ | 1212 | /* If there is none, find *some* other frame. */ |
| 1206 | if (NILP (frame1) || EQ (frame1, frame)) | 1213 | if (NILP (frame1) || EQ (frame1, frame)) |