aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorKarl Heuer1994-10-04 15:36:45 +0000
committerKarl Heuer1994-10-04 15:36:45 +0000
commit8d7a4592e2c7eb9c9719a7bfc45d7e499262ca33 (patch)
treed6f7a55a2e7bc2e669aaf1870cf85e503bb2c40e /src/buffer.c
parent67ba9986a352f3524ddd330523fbbccd40ab2c99 (diff)
downloademacs-8d7a4592e2c7eb9c9719a7bfc45d7e499262ca33.tar.gz
emacs-8d7a4592e2c7eb9c9719a7bfc45d7e499262ca33.zip
(reset_buffer, Ferase_buffer, validate_region, list_buffers_1, recenter_overlay_lists, init_buffer_once): Don't use XFASTINT as an lvalue.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 0470c89baa1..96ce4e702de 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -304,7 +304,7 @@ reset_buffer (b)
304 b->directory = (current_buffer) ? current_buffer->directory : Qnil; 304 b->directory = (current_buffer) ? current_buffer->directory : Qnil;
305 b->modtime = 0; 305 b->modtime = 0;
306 b->save_modified = 1; 306 b->save_modified = 1;
307 XFASTINT (b->save_length) = 0; 307 XSETFASTINT (b->save_length, 0);
308 b->last_window_start = 1; 308 b->last_window_start = 1;
309 b->backed_up = Qnil; 309 b->backed_up = Qnil;
310 b->auto_save_modified = 0; 310 b->auto_save_modified = 0;
@@ -313,7 +313,7 @@ reset_buffer (b)
313 b->read_only = Qnil; 313 b->read_only = Qnil;
314 b->overlays_before = Qnil; 314 b->overlays_before = Qnil;
315 b->overlays_after = Qnil; 315 b->overlays_after = Qnil;
316 XFASTINT (b->overlay_center) = 1; 316 XSETFASTINT (b->overlay_center, 1);
317 b->mark_active = Qnil; 317 b->mark_active = Qnil;
318 318
319 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ 319 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
@@ -1072,7 +1072,7 @@ so the buffer is truly empty after this.")
1072 /* Prevent warnings, or suspension of auto saving, that would happen 1072 /* Prevent warnings, or suspension of auto saving, that would happen
1073 if future size is less than past size. Use of erase-buffer 1073 if future size is less than past size. Use of erase-buffer
1074 implies that the future text is not really related to the past text. */ 1074 implies that the future text is not really related to the past text. */
1075 XFASTINT (current_buffer->save_length) = 0; 1075 XSETFASTINT (current_buffer->save_length, 0);
1076 return Qnil; 1076 return Qnil;
1077} 1077}
1078 1078
@@ -1088,7 +1088,7 @@ validate_region (b, e)
1088 { 1088 {
1089 i = XFASTINT (*b); /* This is legit even if *b is < 0 */ 1089 i = XFASTINT (*b); /* This is legit even if *b is < 0 */
1090 *b = *e; 1090 *b = *e;
1091 XFASTINT (*e) = i; /* because this is all we do with i. */ 1091 XSETFASTINT (*e, i); /* because this is all we do with i. */
1092 } 1092 }
1093 1093
1094 if (!(BEGV <= XINT (*b) && XINT (*b) <= XINT (*e) 1094 if (!(BEGV <= XINT (*b) && XINT (*b) <= XINT (*e)
@@ -1109,10 +1109,10 @@ list_buffers_1 (files)
1109 desired_point = Qnil; 1109 desired_point = Qnil;
1110 other_file_symbol = intern ("list-buffers-directory"); 1110 other_file_symbol = intern ("list-buffers-directory");
1111 1111
1112 XFASTINT (col1) = 19; 1112 XSETFASTINT (col1, 19);
1113 XFASTINT (col2) = 26; 1113 XSETFASTINT (col2, 26);
1114 XFASTINT (col3) = 40; 1114 XSETFASTINT (col3, 40);
1115 XFASTINT (minspace) = 1; 1115 XSETFASTINT (minspace, 1);
1116 1116
1117 Fset_buffer (Vstandard_output); 1117 Fset_buffer (Vstandard_output);
1118 Fbuffer_disable_undo (Vstandard_output); 1118 Fbuffer_disable_undo (Vstandard_output);
@@ -1134,14 +1134,14 @@ list_buffers_1 (files)
1134 continue; 1134 continue;
1135 /* Identify the current buffer. */ 1135 /* Identify the current buffer. */
1136 if (b == old) 1136 if (b == old)
1137 XFASTINT (desired_point) = point; 1137 XSETFASTINT (desired_point, point);
1138 write_string (b == old ? "." : " ", -1); 1138 write_string (b == old ? "." : " ", -1);
1139 /* Identify modified buffers */ 1139 /* Identify modified buffers */
1140 write_string (BUF_MODIFF (b) > b->save_modified ? "*" : " ", -1); 1140 write_string (BUF_MODIFF (b) > b->save_modified ? "*" : " ", -1);
1141 write_string (NILP (b->read_only) ? " " : "% ", -1); 1141 write_string (NILP (b->read_only) ? " " : "% ", -1);
1142 Fprinc (b->name, Qnil); 1142 Fprinc (b->name, Qnil);
1143 Findent_to (col1, make_number (2)); 1143 Findent_to (col1, make_number (2));
1144 XFASTINT (tem) = BUF_Z (b) - BUF_BEG (b); 1144 XSETFASTINT (tem, BUF_Z (b) - BUF_BEG (b));
1145 Fprin1 (tem, Qnil); 1145 Fprin1 (tem, Qnil);
1146 Findent_to (col2, minspace); 1146 Findent_to (col2, minspace);
1147 Fprinc (b->mode_name, Qnil); 1147 Fprinc (b->mode_name, Qnil);
@@ -1657,7 +1657,7 @@ recenter_overlay_lists (buf, pos)
1657 } 1657 }
1658 } 1658 }
1659 1659
1660 XFASTINT (buf->overlay_center) = pos; 1660 XSETFASTINT (buf->overlay_center, pos);
1661} 1661}
1662 1662
1663/* Fix up overlays that were garbled as a result of permuting markers 1663/* Fix up overlays that were garbled as a result of permuting markers
@@ -2467,17 +2467,17 @@ init_buffer_once ()
2467 buffer_defaults.mark_active = Qnil; 2467 buffer_defaults.mark_active = Qnil;
2468 buffer_defaults.overlays_before = Qnil; 2468 buffer_defaults.overlays_before = Qnil;
2469 buffer_defaults.overlays_after = Qnil; 2469 buffer_defaults.overlays_after = Qnil;
2470 XFASTINT (buffer_defaults.overlay_center) = 1; 2470 XSETFASTINT (buffer_defaults.overlay_center, 1);
2471 2471
2472 XFASTINT (buffer_defaults.tab_width) = 8; 2472 XSETFASTINT (buffer_defaults.tab_width, 8);
2473 buffer_defaults.truncate_lines = Qnil; 2473 buffer_defaults.truncate_lines = Qnil;
2474 buffer_defaults.ctl_arrow = Qt; 2474 buffer_defaults.ctl_arrow = Qt;
2475 2475
2476#ifdef MSDOS 2476#ifdef MSDOS
2477 buffer_defaults.buffer_file_type = Qnil; /* TEXT */ 2477 buffer_defaults.buffer_file_type = Qnil; /* TEXT */
2478#endif 2478#endif
2479 XFASTINT (buffer_defaults.fill_column) = 70; 2479 XSETFASTINT (buffer_defaults.fill_column, 70);
2480 XFASTINT (buffer_defaults.left_margin) = 0; 2480 XSETFASTINT (buffer_defaults.left_margin, 0);
2481 2481
2482 /* Assign the local-flags to the slots that have default values. 2482 /* Assign the local-flags to the slots that have default values.
2483 The local flag is a bit that is used in the buffer 2483 The local flag is a bit that is used in the buffer
@@ -2489,36 +2489,36 @@ init_buffer_once ()
2489 2489
2490 /* 0 means not a lisp var, -1 means always local, else mask */ 2490 /* 0 means not a lisp var, -1 means always local, else mask */
2491 bzero (&buffer_local_flags, sizeof buffer_local_flags); 2491 bzero (&buffer_local_flags, sizeof buffer_local_flags);
2492 XFASTINT (buffer_local_flags.filename) = -1; 2492 XSETFASTINT (buffer_local_flags.filename, -1);
2493 XFASTINT (buffer_local_flags.directory) = -1; 2493 XSETFASTINT (buffer_local_flags.directory, -1);
2494 XFASTINT (buffer_local_flags.backed_up) = -1; 2494 XSETFASTINT (buffer_local_flags.backed_up, -1);
2495 XFASTINT (buffer_local_flags.save_length) = -1; 2495 XSETFASTINT (buffer_local_flags.save_length, -1);
2496 XFASTINT (buffer_local_flags.auto_save_file_name) = -1; 2496 XSETFASTINT (buffer_local_flags.auto_save_file_name, -1);
2497 XFASTINT (buffer_local_flags.read_only) = -1; 2497 XSETFASTINT (buffer_local_flags.read_only, -1);
2498 XFASTINT (buffer_local_flags.major_mode) = -1; 2498 XSETFASTINT (buffer_local_flags.major_mode, -1);
2499 XFASTINT (buffer_local_flags.mode_name) = -1; 2499 XSETFASTINT (buffer_local_flags.mode_name, -1);
2500 XFASTINT (buffer_local_flags.undo_list) = -1; 2500 XSETFASTINT (buffer_local_flags.undo_list, -1);
2501 XFASTINT (buffer_local_flags.mark_active) = -1; 2501 XSETFASTINT (buffer_local_flags.mark_active, -1);
2502 2502
2503 XFASTINT (buffer_local_flags.mode_line_format) = 1; 2503 XSETFASTINT (buffer_local_flags.mode_line_format, 1);
2504 XFASTINT (buffer_local_flags.abbrev_mode) = 2; 2504 XSETFASTINT (buffer_local_flags.abbrev_mode, 2);
2505 XFASTINT (buffer_local_flags.overwrite_mode) = 4; 2505 XSETFASTINT (buffer_local_flags.overwrite_mode, 4);
2506 XFASTINT (buffer_local_flags.case_fold_search) = 8; 2506 XSETFASTINT (buffer_local_flags.case_fold_search, 8);
2507 XFASTINT (buffer_local_flags.auto_fill_function) = 0x10; 2507 XSETFASTINT (buffer_local_flags.auto_fill_function, 0x10);
2508 XFASTINT (buffer_local_flags.selective_display) = 0x20; 2508 XSETFASTINT (buffer_local_flags.selective_display, 0x20);
2509#ifndef old 2509#ifndef old
2510 XFASTINT (buffer_local_flags.selective_display_ellipses) = 0x40; 2510 XSETFASTINT (buffer_local_flags.selective_display_ellipses, 0x40);
2511#endif 2511#endif
2512 XFASTINT (buffer_local_flags.tab_width) = 0x80; 2512 XSETFASTINT (buffer_local_flags.tab_width, 0x80);
2513 XFASTINT (buffer_local_flags.truncate_lines) = 0x100; 2513 XSETFASTINT (buffer_local_flags.truncate_lines, 0x100);
2514 XFASTINT (buffer_local_flags.ctl_arrow) = 0x200; 2514 XSETFASTINT (buffer_local_flags.ctl_arrow, 0x200);
2515 XFASTINT (buffer_local_flags.fill_column) = 0x400; 2515 XSETFASTINT (buffer_local_flags.fill_column, 0x400);
2516 XFASTINT (buffer_local_flags.left_margin) = 0x800; 2516 XSETFASTINT (buffer_local_flags.left_margin, 0x800);
2517 XFASTINT (buffer_local_flags.abbrev_table) = 0x1000; 2517 XSETFASTINT (buffer_local_flags.abbrev_table, 0x1000);
2518 XFASTINT (buffer_local_flags.display_table) = 0x2000; 2518 XSETFASTINT (buffer_local_flags.display_table, 0x2000);
2519 XFASTINT (buffer_local_flags.syntax_table) = 0x8000; 2519 XSETFASTINT (buffer_local_flags.syntax_table, 0x8000);
2520#ifdef MSDOS 2520#ifdef MSDOS
2521 XFASTINT (buffer_local_flags.buffer_file_type) = 0x4000; 2521 XSETFASTINT (buffer_local_flags.buffer_file_type, 0x4000);
2522#endif 2522#endif
2523 2523
2524 Vbuffer_alist = Qnil; 2524 Vbuffer_alist = Qnil;