From 781f4782a7b52a803f01b1c6941984cde9369603 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 29 Mar 2013 19:50:21 +0400 Subject: [PATCH] * indent.c (current_column_bol_cache): Remove leftover which is not used in Fmove_to_column any more. (current_column, scan_for_column): Adjust users. * keyboard.c (last_point_position_buffer, last_point_position_window): Remove leftovers which are not used for recording undo any more. (command_loop_1, syms_of_keyboard): Adjust users. * xdisp.c (last_max_ascent): Remove leftover which is not used in redisplay_window any more. (move_it_to): Adjust user. --- src/ChangeLog | 12 ++++++++++++ src/indent.c | 11 ----------- src/keyboard.c | 11 ----------- src/xdisp.c | 4 +--- 4 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e741432a9c4..14e21e402d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2013-03-29 Dmitry Antipov + + * indent.c (current_column_bol_cache): Remove leftover which is not + used in Fmove_to_column any more. + (current_column, scan_for_column): Adjust users. + * keyboard.c (last_point_position_buffer, last_point_position_window): + Remove leftovers which are not used for recording undo any more. + (command_loop_1, syms_of_keyboard): Adjust users. + * xdisp.c (last_max_ascent): Remove leftover which is not used in + redisplay_window any more. + (move_it_to): Adjust user. + 2013-03-29 Juanma Barranquero * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)): diff --git a/src/indent.c b/src/indent.c index 1493e1d5ee5..345dfaa9ce3 100644 --- a/src/indent.c +++ b/src/indent.c @@ -56,11 +56,6 @@ static EMACS_INT last_known_column_modified; static ptrdiff_t current_column_1 (void); static ptrdiff_t position_indentation (ptrdiff_t); -/* Cache of beginning of line found by the last call of - current_column. */ - -static ptrdiff_t current_column_bol_cache; - /* Get the display table to use for the current buffer. */ struct Lisp_Char_Table * @@ -439,11 +434,6 @@ current_column (void) col += post_tab; } - if (ptr == BEGV_ADDR) - current_column_bol_cache = BEGV; - else - current_column_bol_cache = BYTE_TO_CHAR (PTR_BYTE_POS (ptr)); - last_known_column = col; last_known_column_point = PT; last_known_column_modified = MODIFF; @@ -525,7 +515,6 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol) { ptrdiff_t opoint = PT, opoint_byte = PT_BYTE; scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); - current_column_bol_cache = PT; scan = PT, scan_byte = PT_BYTE; SET_PT_BOTH (opoint, opoint_byte); next_boundary = scan; diff --git a/src/keyboard.c b/src/keyboard.c index 5b2eb8c7cd2..beba3025887 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -210,12 +210,6 @@ static EMACS_INT last_auto_save; /* The value of point when the last command was started. */ static ptrdiff_t last_point_position; -/* The buffer that was current when the last command was started. */ -static Lisp_Object last_point_position_buffer; - -/* The window that was selected when the last command was started. */ -static Lisp_Object last_point_position_window; - /* The frame in which the last input event occurred, or Qmacro if the last event came from a macro. We use this to determine when to generate switch-frame events. This may be cleared by functions @@ -1512,8 +1506,6 @@ command_loop_1 (void) prev_buffer = current_buffer; prev_modiff = MODIFF; last_point_position = PT; - last_point_position_window = selected_window; - XSETBUFFER (last_point_position_buffer, prev_buffer); /* By default, we adjust point to a boundary of a region that has such a property that should be treated intangible @@ -11047,9 +11039,6 @@ syms_of_keyboard (void) Fset (Qinput_method_exit_on_first_char, Qnil); Fset (Qinput_method_use_echo_area, Qnil); - last_point_position_buffer = Qnil; - last_point_position_window = Qnil; - { int i; int len = sizeof (head_table) / sizeof (head_table[0]); diff --git a/src/xdisp.c b/src/xdisp.c index 27987c69b19..32c8224cf04 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -580,7 +580,7 @@ static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS]; /* Ascent and height of the last line processed by move_it_to. */ -static int last_max_ascent, last_height; +static int last_height; /* Non-zero if there's a help-echo in the echo area. */ @@ -8925,7 +8925,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos it->current_y += it->max_ascent + it->max_descent; ++it->vpos; last_height = it->max_ascent + it->max_descent; - last_max_ascent = it->max_ascent; it->max_ascent = it->max_descent = 0; } @@ -8952,7 +8951,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos it->current_y += it->max_ascent + it->max_descent; ++it->vpos; last_height = it->max_ascent + it->max_descent; - last_max_ascent = it->max_ascent; } if (backup_data) -- 2.39.2