diff options
| author | Richard M. Stallman | 1996-09-02 05:13:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-02 05:13:11 +0000 |
| commit | 86e4843672eb5ac9f51161b4c67e73fe6e4cb4e0 (patch) | |
| tree | 58917c5b7201a8e0761b9bb555f6d65b69a63bbf /src | |
| parent | 0dc6f165b8923ea111535563ee1ff7a36306e439 (diff) | |
| download | emacs-86e4843672eb5ac9f51161b4c67e73fe6e4cb4e0.tar.gz emacs-86e4843672eb5ac9f51161b4c67e73fe6e4cb4e0.zip | |
(unshow_buffer): Clear last_selected_window slot, maybe.
(Fset_window_buffer): Set last_selected_window slot.
(Fselect_window): Set last_selected_window slot.
(delete_all_subwindows): Maybe call unshow_buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index 9b59640497d..925b4d6aed9 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -692,6 +692,9 @@ unshow_buffer (w) | |||
| 692 | if (XBUFFER (buf) != XMARKER (w->pointm)->buffer) | 692 | if (XBUFFER (buf) != XMARKER (w->pointm)->buffer) |
| 693 | abort (); | 693 | abort (); |
| 694 | 694 | ||
| 695 | if (w == XWINDOW (XBUFFER (buf)->last_selected_window)) | ||
| 696 | XBUFFER (buf)->last_selected_window = Qnil; | ||
| 697 | |||
| 695 | #if 0 | 698 | #if 0 |
| 696 | if (w == XWINDOW (selected_window) | 699 | if (w == XWINDOW (selected_window) |
| 697 | || ! EQ (buf, XWINDOW (selected_window)->buffer)) | 700 | || ! EQ (buf, XWINDOW (selected_window)->buffer)) |
| @@ -1842,6 +1845,10 @@ BUFFER can be a buffer or buffer name.") | |||
| 1842 | } | 1845 | } |
| 1843 | 1846 | ||
| 1844 | w->buffer = buffer; | 1847 | w->buffer = buffer; |
| 1848 | |||
| 1849 | if (EQ (window, selected_window)) | ||
| 1850 | XBUFFER (w->buffer)->last_selected_window = window; | ||
| 1851 | |||
| 1845 | XSETFASTINT (w->window_end_pos, 0); | 1852 | XSETFASTINT (w->window_end_pos, 0); |
| 1846 | w->window_end_valid = Qnil; | 1853 | w->window_end_valid = Qnil; |
| 1847 | XSETFASTINT (w->hscroll, 0); | 1854 | XSETFASTINT (w->hscroll, 0); |
| @@ -1918,6 +1925,8 @@ before each command.") | |||
| 1918 | record_buffer (w->buffer); | 1925 | record_buffer (w->buffer); |
| 1919 | Fset_buffer (w->buffer); | 1926 | Fset_buffer (w->buffer); |
| 1920 | 1927 | ||
| 1928 | XBUFFER (w->buffer)->last_selected_window = window; | ||
| 1929 | |||
| 1921 | /* Go to the point recorded in the window. | 1930 | /* Go to the point recorded in the window. |
| 1922 | This is important when the buffer is in more | 1931 | This is important when the buffer is in more |
| 1923 | than one window. It also matters when | 1932 | than one window. It also matters when |
| @@ -3221,6 +3230,9 @@ delete_all_subwindows (w) | |||
| 3221 | 3230 | ||
| 3222 | w->height = w->buffer; /* See Fset_window_configuration for excuse. */ | 3231 | w->height = w->buffer; /* See Fset_window_configuration for excuse. */ |
| 3223 | 3232 | ||
| 3233 | if (!NILP (w->buffer)) | ||
| 3234 | unshow_buffer (w); | ||
| 3235 | |||
| 3224 | /* We set all three of these fields to nil, to make sure that we can | 3236 | /* We set all three of these fields to nil, to make sure that we can |
| 3225 | distinguish this dead window from any live window. Live leaf | 3237 | distinguish this dead window from any live window. Live leaf |
| 3226 | windows will have buffer set, and combination windows will have | 3238 | windows will have buffer set, and combination windows will have |