GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
/* Get the display table to use for the current buffer. */
-struct Lisp_Vector *
+struct Lisp_Char_Table *
buffer_display_table ()
{
Lisp_Object thisbuf;
thisbuf = current_buffer->display_table;
- if (VECTORP (thisbuf) && XVECTOR (thisbuf)->size == DISP_TABLE_SIZE)
- return XVECTOR (thisbuf);
- if (VECTORP (Vstandard_display_table)
- && XVECTOR (Vstandard_display_table)->size == DISP_TABLE_SIZE)
- return XVECTOR (Vstandard_display_table);
+ if (DISP_TABLE_P (thisbuf))
+ return XCHAR_TABLE (thisbuf);
+ if (DISP_TABLE_P (Vstandard_display_table))
+ return XCHAR_TABLE (Vstandard_display_table);
return 0;
}
\f
static int
character_width (c, dp)
int c;
- struct Lisp_Vector *dp;
+ struct Lisp_Char_Table *dp;
{
Lisp_Object elt;
invalidate the buffer's width_run_cache. */
int
disptab_matches_widthtab (disptab, widthtab)
- struct Lisp_Vector *disptab;
+ struct Lisp_Char_Table *disptab;
struct Lisp_Vector *widthtab;
{
int i;
void
recompute_width_table (buf, disptab)
struct buffer *buf;
- struct Lisp_Vector *disptab;
+ struct Lisp_Char_Table *disptab;
{
int i;
struct Lisp_Vector *widthtab;
register int c;
register int tab_width = XINT (current_buffer->tab_width);
int ctl_arrow = !NILP (current_buffer->ctl_arrow);
- register struct Lisp_Vector *dp = buffer_display_table ();
+ register struct Lisp_Char_Table *dp = buffer_display_table ();
int stopchar;
if (point == last_known_column_point
register int c;
register int tab_width = XINT (current_buffer->tab_width);
int ctl_arrow = !NILP (current_buffer->ctl_arrow);
- register struct Lisp_Vector *dp = buffer_display_table ();
+ register struct Lisp_Char_Table *dp = buffer_display_table ();
int b, e;
if (NILP (end))
}
\f
-DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, 0,
+DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p",
"Move point to column COLUMN in the current line.\n\
The column of a character is calculated by adding together the widths\n\
as displayed of the previous characters in the line.\n\
register int end;
register int tab_width = XINT (current_buffer->tab_width);
register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
- register struct Lisp_Vector *dp = buffer_display_table ();
+ register struct Lisp_Char_Table *dp = buffer_display_table ();
Lisp_Object val;
int prev_col;
register int c;
register int tab_width = XFASTINT (current_buffer->tab_width);
register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
- register struct Lisp_Vector *dp = window_display_table (win);
+ register struct Lisp_Char_Table *dp = window_display_table (win);
int selective
= (INTEGERP (current_buffer->selective_display)
? XINT (current_buffer->selective_display)
lmargin + (XFASTINT (prevline) == BEG
? start_hpos : 0),
0,
- from, 1 << (INTBITS - 2), 0,
+ from, 1 << (BITS_PER_INT - 2), 0,
width, hscroll, 0, w);
vpos -= pos.vpos;
first = 0;
lmargin + (XFASTINT (prevline) == BEG
? start_hpos : 0),
0,
- from, 1 << (INTBITS - 2), 0,
+ from, 1 << (BITS_PER_INT - 2), 0,
width, hscroll, 0, w);
did_motion = 1;
}
did_motion = 0;
}
return compute_motion (from, vpos, pos.hpos, did_motion,
- ZV, vtarget, - (1 << (INTBITS - 2)),
+ ZV, vtarget, - (1 << (BITS_PER_INT - 2)),
width, hscroll, pos.vpos * width, w);
}