diff options
| author | Gerd Moellmann | 2000-06-30 19:21:04 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-06-30 19:21:04 +0000 |
| commit | 3780bc22276f5b2cfa4556ca11c7b9febed1d317 (patch) | |
| tree | e6c07531e3314937ffc7d9187ad5cda01bf9f3fa | |
| parent | bb6677a88c75d748da5613611b367226ab07a3b8 (diff) | |
| download | emacs-3780bc22276f5b2cfa4556ca11c7b9febed1d317.tar.gz emacs-3780bc22276f5b2cfa4556ca11c7b9febed1d317.zip | |
(next_frame): Don't check frame-focus redirection in
case MINIBUF is a window. Doing so excludes frames using MINIBUF
unless their focus is redirected, which contradicts the
specification of next-frame, and leads to infinite loops in
certain situations when cycling through windows with next-window.
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/frame.c | 11 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9d44e3092b5..0a254301fa6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2000-06-30 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * frame.c (next_frame): Don't check frame-focus redirection in | ||
| 4 | case MINIBUF is a window. Doing so excludes frames using MINIBUF | ||
| 5 | unless their focus is redirected, which contradicts the | ||
| 6 | specification of next-frame, and leads to infinite loops in | ||
| 7 | certain situations when cycling through windows with next-window. | ||
| 8 | |||
| 1 | 2000-06-30 Kenichi Handa <handa@etl.go.jp> | 9 | 2000-06-30 Kenichi Handa <handa@etl.go.jp> |
| 2 | 10 | ||
| 3 | * coding.c (code_convert_region): Even if the length of text is | 11 | * coding.c (code_convert_region): Even if the length of text is |
diff --git a/src/frame.c b/src/frame.c index 0a8ac6afb3b..2217b630374 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -934,7 +934,7 @@ next_frame (frame, minibuf) | |||
| 934 | if (FRAME_VISIBLE_P (XFRAME (f))) | 934 | if (FRAME_VISIBLE_P (XFRAME (f))) |
| 935 | return f; | 935 | return f; |
| 936 | } | 936 | } |
| 937 | else if (XFASTINT (minibuf) == 0) | 937 | else if (INTEGERP (minibuf) && XINT (minibuf) == 0) |
| 938 | { | 938 | { |
| 939 | FRAME_SAMPLE_VISIBILITY (XFRAME (f)); | 939 | FRAME_SAMPLE_VISIBILITY (XFRAME (f)); |
| 940 | if (FRAME_VISIBLE_P (XFRAME (f)) | 940 | if (FRAME_VISIBLE_P (XFRAME (f)) |
| @@ -943,6 +943,10 @@ next_frame (frame, minibuf) | |||
| 943 | } | 943 | } |
| 944 | else if (WINDOWP (minibuf)) | 944 | else if (WINDOWP (minibuf)) |
| 945 | { | 945 | { |
| 946 | #if 0 /* I don't think the test for frame focus redirection is | ||
| 947 | correct. This excludes frames "using the current minibuffer" | ||
| 948 | when their focus isn't redirected, which contradicts the doc | ||
| 949 | string of next-frame. --gerd, 2000-06-30 */ | ||
| 946 | if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) | 950 | if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) |
| 947 | /* Check that F either is, or has forwarded its focus to, | 951 | /* Check that F either is, or has forwarded its focus to, |
| 948 | MINIBUF's frame. */ | 952 | MINIBUF's frame. */ |
| @@ -950,6 +954,11 @@ next_frame (frame, minibuf) | |||
| 950 | || EQ (WINDOW_FRAME (XWINDOW (minibuf)), | 954 | || EQ (WINDOW_FRAME (XWINDOW (minibuf)), |
| 951 | FRAME_FOCUS_FRAME (XFRAME (f))))) | 955 | FRAME_FOCUS_FRAME (XFRAME (f))))) |
| 952 | return f; | 956 | return f; |
| 957 | #else /* not 0 */ | ||
| 958 | if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) | ||
| 959 | || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f)) | ||
| 960 | return f; | ||
| 961 | #endif /* not 0 */ | ||
| 953 | } | 962 | } |
| 954 | else | 963 | else |
| 955 | return f; | 964 | return f; |