comparison src/xdisp.c @ 29445:cb3ad8f8f0ed

(redisplay_window): Always use set_buffer_internal_1.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 05 Jun 2000 19:21:06 +0000
parents fd1702d12671
children 9f4660c2f1b9
comparison
equal deleted inserted replaced
29444:cab67467450d 29445:cb3ad8f8f0ed
8507 int update_mode_line; 8507 int update_mode_line;
8508 int tem; 8508 int tem;
8509 struct it it; 8509 struct it it;
8510 /* Record it now because it's overwritten. */ 8510 /* Record it now because it's overwritten. */
8511 int current_matrix_up_to_date_p = 0; 8511 int current_matrix_up_to_date_p = 0;
8512 int really_switched_buffer = 0;
8513 int temp_scroll_step = 0; 8512 int temp_scroll_step = 0;
8514 int count = specpdl_ptr - specpdl; 8513 int count = specpdl_ptr - specpdl;
8515 8514
8516 SET_TEXT_POS (lpoint, PT, PT_BYTE); 8515 SET_TEXT_POS (lpoint, PT, PT_BYTE);
8517 opoint = lpoint; 8516 opoint = lpoint;
8560 } 8559 }
8561 } 8560 }
8562 8561
8563 /* Otherwise set up data on this window; select its buffer and point 8562 /* Otherwise set up data on this window; select its buffer and point
8564 value. */ 8563 value. */
8565 if (update_mode_line) 8564 /* Really select the buffer, for the sake of buffer-local
8566 { 8565 variables. */
8567 /* Really select the buffer, for the sake of buffer-local 8566 set_buffer_internal_1 (XBUFFER (w->buffer));
8568 variables. */
8569 set_buffer_internal_1 (XBUFFER (w->buffer));
8570 really_switched_buffer = 1;
8571 }
8572 else
8573 set_buffer_temp (XBUFFER (w->buffer));
8574 SET_TEXT_POS (opoint, PT, PT_BYTE); 8567 SET_TEXT_POS (opoint, PT, PT_BYTE);
8575 8568
8576 current_matrix_up_to_date_p 8569 current_matrix_up_to_date_p
8577 = (!NILP (w->window_end_valid) 8570 = (!NILP (w->window_end_valid)
8578 && !current_buffer->clip_changed 8571 && !current_buffer->clip_changed
8708 than to get into an infinite loop calling the hook functions 8701 than to get into an infinite loop calling the hook functions
8709 and having them get more errors. */ 8702 and having them get more errors. */
8710 if (!update_mode_line 8703 if (!update_mode_line
8711 || ! NILP (Vwindow_scroll_functions)) 8704 || ! NILP (Vwindow_scroll_functions))
8712 { 8705 {
8713 if (!really_switched_buffer)
8714 {
8715 set_buffer_temp (old);
8716 set_buffer_internal_1 (XBUFFER (w->buffer));
8717 really_switched_buffer = 1;
8718 }
8719
8720 update_mode_line = 1; 8706 update_mode_line = 1;
8721 w->update_mode_line = Qt; 8707 w->update_mode_line = Qt;
8722 startp = run_window_scroll_functions (window, startp); 8708 startp = run_window_scroll_functions (window, startp);
8723 } 8709 }
8724 8710
9043 XSETFASTINT (w->last_overlay_modified, 0); 9029 XSETFASTINT (w->last_overlay_modified, 0);
9044 9030
9045 /* Redisplay the mode line. Select the buffer properly for that. */ 9031 /* Redisplay the mode line. Select the buffer properly for that. */
9046 if (!update_mode_line) 9032 if (!update_mode_line)
9047 { 9033 {
9048 if (!really_switched_buffer)
9049 {
9050 set_buffer_temp (old);
9051 set_buffer_internal_1 (XBUFFER (w->buffer));
9052 really_switched_buffer = 1;
9053 }
9054 update_mode_line = 1; 9034 update_mode_line = 1;
9055 w->update_mode_line = Qt; 9035 w->update_mode_line = Qt;
9056 } 9036 }
9057 9037
9058 /* Try to scroll by specified few lines. */ 9038 /* Try to scroll by specified few lines. */
9204 { 9184 {
9205 Lisp_Object old_selected_frame; 9185 Lisp_Object old_selected_frame;
9206 9186
9207 old_selected_frame = selected_frame; 9187 old_selected_frame = selected_frame;
9208 9188
9209 if (!really_switched_buffer)
9210 {
9211 set_buffer_temp (old);
9212 set_buffer_internal_1 (XBUFFER (w->buffer));
9213 really_switched_buffer = 1;
9214 }
9215
9216 XSETFRAME (selected_frame, f); 9189 XSETFRAME (selected_frame, f);
9217 display_mode_lines (w); 9190 display_mode_lines (w);
9218 selected_frame = old_selected_frame; 9191 selected_frame = old_selected_frame;
9219 9192
9220 /* If mode line height has changed, arrange for a thorough 9193 /* If mode line height has changed, arrange for a thorough
9319 9292
9320 restore_buffers: 9293 restore_buffers:
9321 9294
9322 /* Restore current_buffer and value of point in it. */ 9295 /* Restore current_buffer and value of point in it. */
9323 TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); 9296 TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint));
9324 if (really_switched_buffer) 9297 set_buffer_internal_1 (old);
9325 set_buffer_internal_1 (old);
9326 else
9327 set_buffer_temp (old);
9328 TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); 9298 TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint));
9329 9299
9330 unbind_to (count, Qnil); 9300 unbind_to (count, Qnil);
9331 } 9301 }
9332 9302