summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-08-17 23:06:39 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-08-17 23:06:39 -0700
commit39eb03f1b023ae3d94e311f6f5d9f913f75c42c4 (patch)
tree454b784e6ccc782a6f3c16d67e01cc8a1e5051be /src/undo.c
parent2170b1bdd500484349deec2d946119e6a653e198 (diff)
downloademacs-39eb03f1b023ae3d94e311f6f5d9f913f75c42c4.tar.gz
* buffer.h (BSET): Remove.
Replace all uses with calls to new setter functions. (bset_bidi_paragraph_direction, bset_case_canon_table) (bset_case_eqv_table, bset_directory, bset_display_count) (bset_display_time, bset_downcase_table) (bset_enable_multibyte_characters, bset_filename, bset_keymap) (bset_last_selected_window, bset_local_var_alist) (bset_mark_active, bset_point_before_scroll, bset_read_only) (bset_truncate_lines, bset_undo_list, bset_upcase_table) (bset_width_table): * buffer.c (bset_abbrev_mode, bset_abbrev_table) (bset_auto_fill_function, bset_auto_save_file_format) (bset_auto_save_file_name, bset_backed_up, bset_begv_marker) (bset_bidi_display_reordering, bset_buffer_file_coding_system) (bset_cache_long_line_scans, bset_case_fold_search) (bset_ctl_arrow, bset_cursor_in_non_selected_windows) (bset_cursor_type, bset_display_table, bset_extra_line_spacing) (bset_file_format, bset_file_truename, bset_fringe_cursor_alist) (bset_fringe_indicator_alist, bset_fringes_outside_margins) (bset_header_line_format, bset_indicate_buffer_boundaries) (bset_indicate_empty_lines, bset_invisibility_spec) (bset_left_fringe_width, bset_major_mode, bset_mark) (bset_minor_modes, bset_mode_line_format, bset_mode_name) (bset_name, bset_overwrite_mode, bset_pt_marker) (bset_right_fringe_width, bset_save_length) (bset_scroll_bar_width, bset_scroll_down_aggressively) (bset_scroll_up_aggressively, bset_selective_display) (bset_selective_display_ellipses, bset_vertical_scroll_bar_type) (bset_word_wrap, bset_zv_marker): * category.c (bset_category_table): * syntax.c (bset_syntax_table): New setter functions. Fixes: debbugs:12215
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/src/undo.c b/src/undo.c
index cfb67ba5bc8..777e3291806 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -104,9 +104,9 @@ record_point (ptrdiff_t pt)
if (at_boundary
&& current_buffer == last_boundary_buffer
&& last_boundary_position != pt)
- BSET (current_buffer, undo_list,
- Fcons (make_number (last_boundary_position),
- BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (make_number (last_boundary_position),
+ BVAR (current_buffer, undo_list)));
}
/* Record an insertion that just happened or is about to happen,
@@ -142,8 +142,8 @@ record_insert (ptrdiff_t beg, ptrdiff_t length)
XSETFASTINT (lbeg, beg);
XSETINT (lend, beg + length);
- BSET (current_buffer, undo_list,
- Fcons (Fcons (lbeg, lend), BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (Fcons (lbeg, lend), BVAR (current_buffer, undo_list)));
}
/* Record that a deletion is about to take place,
@@ -168,8 +168,9 @@ record_delete (ptrdiff_t beg, Lisp_Object string)
record_point (beg);
}
- BSET (current_buffer, undo_list,
- Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list)));
}
/* Record the fact that MARKER is about to be adjusted by ADJUSTMENT.
@@ -191,9 +192,10 @@ record_marker_adjustment (Lisp_Object marker, ptrdiff_t adjustment)
Fundo_boundary ();
last_undo_buffer = current_buffer;
- BSET (current_buffer, undo_list,
- Fcons (Fcons (marker, make_number (adjustment)),
- BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ Fcons (Fcons (marker, make_number (adjustment)),
+ BVAR (current_buffer, undo_list)));
}
/* Record that a replacement is about to take place,
@@ -226,9 +228,10 @@ record_first_change (void)
if (base_buffer->base_buffer)
base_buffer = base_buffer->base_buffer;
- BSET (current_buffer, undo_list,
- Fcons (Fcons (Qt, make_lisp_time (base_buffer->modtime)),
- BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ Fcons (Fcons (Qt, make_lisp_time (base_buffer->modtime)),
+ BVAR (current_buffer, undo_list)));
}
/* Record a change in property PROP (whose old value was VAL)
@@ -266,8 +269,8 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
XSETINT (lbeg, beg);
XSETINT (lend, beg + length);
entry = Fcons (Qnil, Fcons (prop, Fcons (value, Fcons (lbeg, lend))));
- BSET (current_buffer, undo_list,
- Fcons (entry, BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (entry, BVAR (current_buffer, undo_list)));
current_buffer = obuf;
}
@@ -290,11 +293,12 @@ but another undo command will undo to the previous boundary. */)
/* If we have preallocated the cons cell to use here,
use that one. */
XSETCDR (pending_boundary, BVAR (current_buffer, undo_list));
- BSET (current_buffer, undo_list, pending_boundary);
+ bset_undo_list (current_buffer, pending_boundary);
pending_boundary = Qnil;
}
else
- BSET (current_buffer, undo_list, Fcons (Qnil, BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (Qnil, BVAR (current_buffer, undo_list)));
}
last_boundary_position = PT;
last_boundary_buffer = current_buffer;
@@ -435,7 +439,7 @@ truncate_undo_list (struct buffer *b)
XSETCDR (last_boundary, Qnil);
/* There's nothing we decided to keep, so clear it out. */
else
- BSET (b, undo_list, Qnil);
+ bset_undo_list (b, Qnil);
unbind_to (count, Qnil);
}
@@ -650,8 +654,9 @@ Return what remains of the list. */)
will work right. */
if (did_apply
&& EQ (oldlist, BVAR (current_buffer, undo_list)))
- BSET (current_buffer, undo_list,
- Fcons (list3 (Qapply, Qcdr, Qnil), BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ Fcons (list3 (Qapply, Qcdr, Qnil), BVAR (current_buffer, undo_list)));
UNGCPRO;
return unbind_to (count, list);