diff options
| author | Stefan Monnier | 2007-09-27 18:27:48 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-09-27 18:27:48 +0000 |
| commit | bdf5f8ef91c0d481134603d0840c07debc32db01 (patch) | |
| tree | 8b6fdc2ae9e6336659b0e9600da940800b452624 /src | |
| parent | d567be222cce21e4958a27906d81fceffa40a45c (diff) | |
| download | emacs-bdf5f8ef91c0d481134603d0840c07debc32db01.tar.gz emacs-bdf5f8ef91c0d481134603d0840c07debc32db01.zip | |
(Fmove_to_column): Use EMACS_INT for buffer positions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/indent.c | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5042ff7b0db..6d591b6d1a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-09-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * indent.c (Fmove_to_column): Use EMACS_INT for buffer positions. | ||
| 4 | |||
| 1 | 2007-09-25 Jason Rumney <jasonr@gnu.org> | 5 | 2007-09-25 Jason Rumney <jasonr@gnu.org> |
| 2 | 6 | ||
| 3 | * frame.c (make_terminal_frame): Remove special case for WINDOWSNT. | 7 | * frame.c (make_terminal_frame): Remove special case for WINDOWSNT. |
diff --git a/src/indent.c b/src/indent.c index 88856814279..c07073347e2 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -932,19 +932,19 @@ The return value is the current column. */) | |||
| 932 | (column, force) | 932 | (column, force) |
| 933 | Lisp_Object column, force; | 933 | Lisp_Object column, force; |
| 934 | { | 934 | { |
| 935 | register int pos; | 935 | register EMACS_INT pos; |
| 936 | register int col = current_column (); | 936 | register EMACS_INT col = current_column (); |
| 937 | register int goal; | 937 | register EMACS_INT goal; |
| 938 | register int end; | 938 | register EMACS_INT end; |
| 939 | register int tab_width = XINT (current_buffer->tab_width); | 939 | register int tab_width = XINT (current_buffer->tab_width); |
| 940 | register int ctl_arrow = !NILP (current_buffer->ctl_arrow); | 940 | register int ctl_arrow = !NILP (current_buffer->ctl_arrow); |
| 941 | register struct Lisp_Char_Table *dp = buffer_display_table (); | 941 | register struct Lisp_Char_Table *dp = buffer_display_table (); |
| 942 | register int multibyte = !NILP (current_buffer->enable_multibyte_characters); | 942 | register int multibyte = !NILP (current_buffer->enable_multibyte_characters); |
| 943 | 943 | ||
| 944 | Lisp_Object val; | 944 | Lisp_Object val; |
| 945 | int prev_col = 0; | 945 | EMACS_INT prev_col = 0; |
| 946 | int c = 0; | 946 | int c = 0; |
| 947 | int next_boundary, pos_byte; | 947 | EMACS_INT next_boundary, pos_byte; |
| 948 | 948 | ||
| 949 | if (tab_width <= 0 || tab_width > 1000) tab_width = 8; | 949 | if (tab_width <= 0 || tab_width > 1000) tab_width = 8; |
| 950 | CHECK_NATNUM (column); | 950 | CHECK_NATNUM (column); |
| @@ -970,7 +970,7 @@ The return value is the current column. */) | |||
| 970 | { | 970 | { |
| 971 | while (pos == next_boundary) | 971 | while (pos == next_boundary) |
| 972 | { | 972 | { |
| 973 | int prev = pos; | 973 | EMACS_INT prev = pos; |
| 974 | pos = skip_invisible (pos, &next_boundary, end, Qnil); | 974 | pos = skip_invisible (pos, &next_boundary, end, Qnil); |
| 975 | if (pos != prev) | 975 | if (pos != prev) |
| 976 | pos_byte = CHAR_TO_BYTE (pos); | 976 | pos_byte = CHAR_TO_BYTE (pos); |
| @@ -1090,7 +1090,7 @@ The return value is the current column. */) | |||
| 1090 | and scan through it again. */ | 1090 | and scan through it again. */ |
| 1091 | if (!NILP (force) && col > goal && c == '\t' && prev_col < goal) | 1091 | if (!NILP (force) && col > goal && c == '\t' && prev_col < goal) |
| 1092 | { | 1092 | { |
| 1093 | int goal_pt, goal_pt_byte; | 1093 | EMACS_INT goal_pt, goal_pt_byte; |
| 1094 | 1094 | ||
| 1095 | /* Insert spaces in front of the tab to reach GOAL. Do this | 1095 | /* Insert spaces in front of the tab to reach GOAL. Do this |
| 1096 | first so that a marker at the end of the tab gets | 1096 | first so that a marker at the end of the tab gets |