diff options
| author | Richard M. Stallman | 1995-10-11 17:12:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-11 17:12:59 +0000 |
| commit | d44f12b46b15b40b9caa139c08d02f79f5ee114b (patch) | |
| tree | ae5c7a278057a4f714d2cb7c3f05994dcef27a89 /src | |
| parent | c8640abf7e12893dd3879eeac754e06b05d8a859 (diff) | |
| download | emacs-d44f12b46b15b40b9caa139c08d02f79f5ee114b.tar.gz emacs-d44f12b46b15b40b9caa139c08d02f79f5ee114b.zip | |
(buffer_display_table): Use DISP_TABLE_P.
Return type is now struct Lisp_Char_Table *
since display tables are now char-tables.
(character_width, disptab_matches_widthtab, recompute_width_table)
(current_column, Fmove_to_column, compute_motion):
Corresponding changes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/indent.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/indent.c b/src/indent.c index 16a5c4ef039..4510f3ba42c 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -51,17 +51,16 @@ int last_known_column_modified; | |||
| 51 | 51 | ||
| 52 | /* Get the display table to use for the current buffer. */ | 52 | /* Get the display table to use for the current buffer. */ |
| 53 | 53 | ||
| 54 | struct Lisp_Vector * | 54 | struct Lisp_Char_Table * |
| 55 | buffer_display_table () | 55 | buffer_display_table () |
| 56 | { | 56 | { |
| 57 | Lisp_Object thisbuf; | 57 | Lisp_Object thisbuf; |
| 58 | 58 | ||
| 59 | thisbuf = current_buffer->display_table; | 59 | thisbuf = current_buffer->display_table; |
| 60 | if (VECTORP (thisbuf) && XVECTOR (thisbuf)->size == DISP_TABLE_SIZE) | 60 | if (DISP_TABLE_P (thisbuf)) |
| 61 | return XVECTOR (thisbuf); | 61 | return XCHAR_TABLE (thisbuf); |
| 62 | if (VECTORP (Vstandard_display_table) | 62 | if (DISP_TABLE_P (Vstandard_display_table)) |
| 63 | && XVECTOR (Vstandard_display_table)->size == DISP_TABLE_SIZE) | 63 | return XCHAR_TABLE (Vstandard_display_table); |
| 64 | return XVECTOR (Vstandard_display_table); | ||
| 65 | return 0; | 64 | return 0; |
| 66 | } | 65 | } |
| 67 | 66 | ||
| @@ -72,7 +71,7 @@ buffer_display_table () | |||
| 72 | static int | 71 | static int |
| 73 | character_width (c, dp) | 72 | character_width (c, dp) |
| 74 | int c; | 73 | int c; |
| 75 | struct Lisp_Vector *dp; | 74 | struct Lisp_Char_Table *dp; |
| 76 | { | 75 | { |
| 77 | Lisp_Object elt; | 76 | Lisp_Object elt; |
| 78 | 77 | ||
| @@ -106,7 +105,7 @@ character_width (c, dp) | |||
| 106 | invalidate the buffer's width_run_cache. */ | 105 | invalidate the buffer's width_run_cache. */ |
| 107 | int | 106 | int |
| 108 | disptab_matches_widthtab (disptab, widthtab) | 107 | disptab_matches_widthtab (disptab, widthtab) |
| 109 | struct Lisp_Vector *disptab; | 108 | struct Lisp_Char_Table *disptab; |
| 110 | struct Lisp_Vector *widthtab; | 109 | struct Lisp_Vector *widthtab; |
| 111 | { | 110 | { |
| 112 | int i; | 111 | int i; |
| @@ -126,7 +125,7 @@ disptab_matches_widthtab (disptab, widthtab) | |||
| 126 | void | 125 | void |
| 127 | recompute_width_table (buf, disptab) | 126 | recompute_width_table (buf, disptab) |
| 128 | struct buffer *buf; | 127 | struct buffer *buf; |
| 129 | struct Lisp_Vector *disptab; | 128 | struct Lisp_Char_Table *disptab; |
| 130 | { | 129 | { |
| 131 | int i; | 130 | int i; |
| 132 | struct Lisp_Vector *widthtab; | 131 | struct Lisp_Vector *widthtab; |
| @@ -202,7 +201,7 @@ current_column () | |||
| 202 | register int c; | 201 | register int c; |
| 203 | register int tab_width = XINT (current_buffer->tab_width); | 202 | register int tab_width = XINT (current_buffer->tab_width); |
| 204 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); | 203 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); |
| 205 | register struct Lisp_Vector *dp = buffer_display_table (); | 204 | register struct Lisp_Char_Table *dp = buffer_display_table (); |
| 206 | int stopchar; | 205 | int stopchar; |
| 207 | 206 | ||
| 208 | if (point == last_known_column_point | 207 | if (point == last_known_column_point |
| @@ -289,7 +288,7 @@ string_display_width (string, beg, end) | |||
| 289 | register int c; | 288 | register int c; |
| 290 | register int tab_width = XINT (current_buffer->tab_width); | 289 | register int tab_width = XINT (current_buffer->tab_width); |
| 291 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); | 290 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); |
| 292 | register struct Lisp_Vector *dp = buffer_display_table (); | 291 | register struct Lisp_Char_Table *dp = buffer_display_table (); |
| 293 | int b, e; | 292 | int b, e; |
| 294 | 293 | ||
| 295 | if (NILP (end)) | 294 | if (NILP (end)) |
| @@ -485,7 +484,7 @@ and if COLUMN is in the middle of a tab character, change it to spaces.") | |||
| 485 | register int end; | 484 | register int end; |
| 486 | register int tab_width = XINT (current_buffer->tab_width); | 485 | register int tab_width = XINT (current_buffer->tab_width); |
| 487 | register int ctl_arrow = !NILP (current_buffer->ctl_arrow); | 486 | register int ctl_arrow = !NILP (current_buffer->ctl_arrow); |
| 488 | register struct Lisp_Vector *dp = buffer_display_table (); | 487 | register struct Lisp_Char_Table *dp = buffer_display_table (); |
| 489 | 488 | ||
| 490 | Lisp_Object val; | 489 | Lisp_Object val; |
| 491 | int prev_col; | 490 | int prev_col; |
| @@ -649,7 +648,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 649 | register int c; | 648 | register int c; |
| 650 | register int tab_width = XFASTINT (current_buffer->tab_width); | 649 | register int tab_width = XFASTINT (current_buffer->tab_width); |
| 651 | register int ctl_arrow = !NILP (current_buffer->ctl_arrow); | 650 | register int ctl_arrow = !NILP (current_buffer->ctl_arrow); |
| 652 | register struct Lisp_Vector *dp = window_display_table (win); | 651 | register struct Lisp_Char_Table *dp = window_display_table (win); |
| 653 | int selective | 652 | int selective |
| 654 | = (INTEGERP (current_buffer->selective_display) | 653 | = (INTEGERP (current_buffer->selective_display) |
| 655 | ? XINT (current_buffer->selective_display) | 654 | ? XINT (current_buffer->selective_display) |