comparison src/buffer.c @ 11889:1067ddd12dfc

(set_buffer_internal_1): New subroutine. (Fmove_overlay): Don't set windows_or_buffers_changed.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 May 1995 00:43:27 +0000
parents 92a61e91ec05
children ee38e93ccf7e
comparison
equal deleted inserted replaced
11888:23ec1c193810 11889:1067ddd12dfc
98 buffer_slot_type_mismatch will signal an error. */ 98 buffer_slot_type_mismatch will signal an error. */
99 struct buffer buffer_local_types; 99 struct buffer buffer_local_types;
100 100
101 Lisp_Object Fset_buffer (); 101 Lisp_Object Fset_buffer ();
102 void set_buffer_internal (); 102 void set_buffer_internal ();
103 void set_buffer_internal_1 ();
103 static void call_overlay_mod_hooks (); 104 static void call_overlay_mod_hooks ();
104 static void swap_out_buffer_local_variables (); 105 static void swap_out_buffer_local_variables ();
105 106
106 /* Alist of all buffer names vs the buffers. */ 107 /* Alist of all buffer names vs the buffers. */
107 /* This used to be a variable, but is no longer, 108 /* This used to be a variable, but is no longer,
1179 register Lisp_Object buf; 1180 register Lisp_Object buf;
1180 XSETBUFFER (buf, current_buffer); 1181 XSETBUFFER (buf, current_buffer);
1181 return buf; 1182 return buf;
1182 } 1183 }
1183 1184
1184 /* Set the current buffer to b */ 1185 /* Set the current buffer to B. */
1185 1186
1186 void 1187 void
1187 set_buffer_internal (b) 1188 set_buffer_internal (b)
1188 register struct buffer *b; 1189 register struct buffer *b;
1189 { 1190 {
1193 1194
1194 if (current_buffer == b) 1195 if (current_buffer == b)
1195 return; 1196 return;
1196 1197
1197 windows_or_buffers_changed = 1; 1198 windows_or_buffers_changed = 1;
1199 set_buffer_internal_1 (b);
1200 }
1201
1202 /* Set the current buffer to B, and do not set windows_or_buffers_changed.
1203 This is used by redisplay. */
1204
1205 void
1206 set_buffer_internal_1 (b)
1207 register struct buffer *b;
1208 {
1209 register struct buffer *old_buf;
1210 register Lisp_Object tail, valcontents;
1211 Lisp_Object tem;
1212
1213 if (current_buffer == b)
1214 return;
1215
1198 old_buf = current_buffer; 1216 old_buf = current_buffer;
1199 current_buffer = b; 1217 current_buffer = b;
1200 last_known_column_point = -1; /* invalidate indentation cache */ 1218 last_known_column_point = -1; /* invalidate indentation cache */
1201 1219
1202 if (old_buf) 1220 if (old_buf)
2427 redisplay_region (ob, XINT (o_beg), XINT (o_end)); 2445 redisplay_region (ob, XINT (o_beg), XINT (o_end));
2428 } 2446 }
2429 2447
2430 /* Redisplay where the overlay is going to be. */ 2448 /* Redisplay where the overlay is going to be. */
2431 redisplay_region (b, XINT (beg), XINT (end)); 2449 redisplay_region (b, XINT (beg), XINT (end));
2432
2433 /* Don't limit redisplay to the selected window. */
2434 windows_or_buffers_changed = 1;
2435 } 2450 }
2436 else 2451 else
2437 /* Redisplay the area the overlay has just left, or just enclosed. */ 2452 /* Redisplay the area the overlay has just left, or just enclosed. */
2438 { 2453 {
2439 Lisp_Object o_beg; 2454 Lisp_Object o_beg;