diff options
| author | Richard M. Stallman | 1998-05-19 22:35:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-19 22:35:20 +0000 |
| commit | beb4e3124e71067596e6361116b5f259ba48d6dd (patch) | |
| tree | c98bc164020ca920bdb70f7d703bf27d51411baf /src | |
| parent | 81d2de9b9ccc993e5e274b56c17ac045e1da38d5 (diff) | |
| download | emacs-beb4e3124e71067596e6361116b5f259ba48d6dd.tar.gz emacs-beb4e3124e71067596e6361116b5f259ba48d6dd.zip | |
(Fselect_window): Doc fix.
(temp_output_buffer_show): Make the temp buffer current
before running Qtemp_buffer_show_hook.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 17861d652af..254942d3ba4 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1920,9 +1920,12 @@ BUFFER can be a buffer or buffer name.") | |||
| 1920 | 1920 | ||
| 1921 | if (EQ (window, selected_window)) | 1921 | if (EQ (window, selected_window)) |
| 1922 | XBUFFER (w->buffer)->last_selected_window = window; | 1922 | XBUFFER (w->buffer)->last_selected_window = window; |
| 1923 | |||
| 1924 | /* Update time stamps of buffer display. */ | ||
| 1923 | if (INTEGERP (XBUFFER (buffer)->display_count)) | 1925 | if (INTEGERP (XBUFFER (buffer)->display_count)) |
| 1924 | XSETINT (XBUFFER (buffer)->display_count, | 1926 | XSETINT (XBUFFER (buffer)->display_count, |
| 1925 | XINT (XBUFFER (buffer)->display_count) + 1); | 1927 | XINT (XBUFFER (buffer)->display_count) + 1); |
| 1928 | XBUFFER (buffer)->display_time = Fcurrent_time (); | ||
| 1926 | 1929 | ||
| 1927 | XSETFASTINT (w->window_end_pos, 0); | 1930 | XSETFASTINT (w->window_end_pos, 0); |
| 1928 | w->window_end_valid = Qnil; | 1931 | w->window_end_valid = Qnil; |
| @@ -1966,8 +1969,9 @@ BUFFER can be a buffer or buffer name.") | |||
| 1966 | 1969 | ||
| 1967 | DEFUN ("select-window", Fselect_window, Sselect_window, 1, 1, 0, | 1970 | DEFUN ("select-window", Fselect_window, Sselect_window, 1, 1, 0, |
| 1968 | "Select WINDOW. Most editing will apply to WINDOW's buffer.\n\ | 1971 | "Select WINDOW. Most editing will apply to WINDOW's buffer.\n\ |
| 1969 | The main editor command loop selects the buffer of the selected window\n\ | 1972 | If WINDOW is not already selected, also make WINDOW's buffer current.\n\ |
| 1970 | before each command.") | 1973 | Note that the main editor command loop\n\ |
| 1974 | selects the buffer of the selected window before each command.") | ||
| 1971 | (window) | 1975 | (window) |
| 1972 | register Lisp_Object window; | 1976 | register Lisp_Object window; |
| 1973 | { | 1977 | { |
| @@ -2345,7 +2349,8 @@ temp_output_buffer_show (buf) | |||
| 2345 | set_marker_restricted_both (w->start, buf, 1, 1); | 2349 | set_marker_restricted_both (w->start, buf, 1, 1); |
| 2346 | set_marker_restricted_both (w->pointm, buf, 1, 1); | 2350 | set_marker_restricted_both (w->pointm, buf, 1, 1); |
| 2347 | 2351 | ||
| 2348 | /* Run temp-buffer-show-hook, with the chosen window selected. */ | 2352 | /* Run temp-buffer-show-hook, with the chosen window selected |
| 2353 | and it sbuffer current. */ | ||
| 2349 | if (!NILP (Vrun_hooks)) | 2354 | if (!NILP (Vrun_hooks)) |
| 2350 | { | 2355 | { |
| 2351 | Lisp_Object tem; | 2356 | Lisp_Object tem; |
| @@ -2362,6 +2367,7 @@ temp_output_buffer_show (buf) | |||
| 2362 | Fcurrent_window_configuration (Qnil)); | 2367 | Fcurrent_window_configuration (Qnil)); |
| 2363 | 2368 | ||
| 2364 | Fselect_window (window); | 2369 | Fselect_window (window); |
| 2370 | Fset_buffer (w->buffer); | ||
| 2365 | call1 (Vrun_hooks, Qtemp_buffer_show_hook); | 2371 | call1 (Vrun_hooks, Qtemp_buffer_show_hook); |
| 2366 | unbind_to (count, Qnil); | 2372 | unbind_to (count, Qnil); |
| 2367 | } | 2373 | } |