DP is a display table or NULL.
- This macro is used in current_column_1, Fmove_to_column, and
+ This macro is used in scan_for_column and in
compute_motion. */
#define MULTIBYTE_BYTES_WIDTH(p, dp, bytes, width) \
do { \
int ch; \
\
- wide_column = 0; \
ch = STRING_CHAR_AND_LENGTH (p, bytes); \
if (BYTES_BY_CHAR_HEAD (*p) != bytes) \
width = bytes * 4; \
width = XVECTOR (DISP_CHAR_VECTOR (dp, ch))->size; \
else \
width = CHAR_WIDTH (ch); \
- if (width > 1) \
- wide_column = width; \
} \
} while (0)
{
/* Start of multi-byte form. */
unsigned char *ptr;
- int bytes, width, wide_column;
+ int bytes, width;
ptr = BYTE_POS_ADDR (scan_byte);
MULTIBYTE_BYTES_WIDTH (ptr, dp, bytes, width);
#endif /* 0 */
\f
-DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ",
+DEFUE ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ",
doc: /* Indent from point with tabs and spaces until COLUMN is reached.
Optional second argument MINIMUM says always do at least MINIMUM spaces
even if that goes past COLUMN; by default, MINIMUM is zero.
return val >= column;
}
\f
-DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p",
+DEFUE ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p",
doc: /* Move point to column COLUMN in the current line.
Interactively, COLUMN is the value of prefix numeric argument.
The column of a character is calculated by adding together the widths
\f
/* compute_motion: compute buffer posn given screen posn and vice versa */
-struct position val_compute_motion;
+static struct position val_compute_motion;
/* Scan the current buffer forward from offset FROM, pretending that
this is at line FROMVPOS, column FROMHPOS, until reaching buffer
{
/* Start of multi-byte form. */
unsigned char *ptr;
- int mb_bytes, mb_width, wide_column;
+ int mb_bytes, mb_width;
pos_byte--; /* rewind POS_BYTE */
ptr = BYTE_POS_ADDR (pos_byte);
MULTIBYTE_BYTES_WIDTH (ptr, dp, mb_bytes, mb_width);
pos_byte += mb_bytes;
- if (wide_column)
- wide_column_end_hpos = hpos + wide_column;
+ if (mb_width > 1 && BYTES_BY_CHAR_HEAD (*ptr) == mb_bytes)
+ wide_column_end_hpos = hpos + mb_width;
hpos += mb_width;
}
else if (VECTORP (charvec))
\f
/* Fvertical_motion and vmotion */
-struct position val_vmotion;
+static struct position val_vmotion;
struct position *
vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w)
w);
}
-DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0,
+DEFUE ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0,
doc: /* Move point to start of the screen line LINES lines down.
If LINES is negative, this means moving up.
/* Do this even if LINES is 0, so that we move back to the
beginning of the current line as we ought. */
if (XINT (lines) == 0 || IT_CHARPOS (it) > 0)
- move_it_by_lines (&it, XINT (lines), 0);
+ move_it_by_lines (&it, XINT (lines));
}
else
{
|| (it_overshoot_expected < 0
&& it.method == GET_FROM_BUFFER
&& it.c == '\n'))
- move_it_by_lines (&it, -1, 0);
+ move_it_by_lines (&it, -1);
it.vpos = 0;
- move_it_by_lines (&it, XINT (lines), 0);
+ move_it_by_lines (&it, XINT (lines));
}
else
{
while (IT_CHARPOS (it) <= it_start)
{
it.vpos = 0;
- move_it_by_lines (&it, 1, 0);
+ move_it_by_lines (&it, 1);
}
if (XINT (lines) > 1)
- move_it_by_lines (&it, XINT (lines) - 1, 0);
+ move_it_by_lines (&it, XINT (lines) - 1);
}
else
{
it.vpos = 0;
- move_it_by_lines (&it, XINT (lines), 0);
+ move_it_by_lines (&it, XINT (lines));
}
}
}