diff options
| author | Paul Eggert | 2011-03-06 02:27:06 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-06 02:27:06 -0800 |
| commit | 7831777b8a9e8d2f68bd17058359ea8849d66f70 (patch) | |
| tree | 633cc6fdd638927360ff83619a32def87ed02b4c /src | |
| parent | 179b8720a2e5c37d18ab8f601b982fdcabd19626 (diff) | |
| download | emacs-7831777b8a9e8d2f68bd17058359ea8849d66f70.tar.gz emacs-7831777b8a9e8d2f68bd17058359ea8849d66f70.zip | |
current_column: Now returns EMACS_INT, fixing some iftc.
* bytecode.c (Fbyte_code): Don't cast current_column () to int.
* cmds.c (internal_self_insert): Likewise.
* indent.c (Fcurrent_column): Likewise.
* keymap.c (describe_command): Likewise.
* minibuf.c (read_minibuf): Likewise.
* indent.c (Fcurrent_indentation): Don't cast position_indentation ()
to int.
* xdisp.c (redisplay_internal, redisplay_window, decode_mode_spec):
Likewise.
* cmds.c (internal_self_insert): Declare locals to be EMACS_INT,
not int or double, if they might contain a column number.
* indent.c (current_column, Findent_to, indented_beyond_p):
(compute_motion, vmotion): Likewise.
* keymap.c (describe_command): Likewise.
* xdisp.c (pint2str): Likewise.
* indent.c (last_known_column): Now EMACS_INT, not int.
* minibuf.c (minibuf_prompt_width): Likewise.
* indent.c (current_column, current_column_1, position_indentation):
Return EMACS_INT, not double.
* lisp.h (current_column): Likewise.
* indent.c (indented_beyond_p): Last arg is now EMACS_INT, not double.
All callers changed.
* lisp.h (indented_beyond_p): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 25 | ||||
| -rw-r--r-- | src/bytecode.c | 2 | ||||
| -rw-r--r-- | src/cmds.c | 13 | ||||
| -rw-r--r-- | src/indent.c | 49 | ||||
| -rw-r--r-- | src/keymap.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 4 | ||||
| -rw-r--r-- | src/minibuf.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 15 |
8 files changed, 68 insertions, 46 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4955966ad81..d0380e42e49 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,30 @@ | |||
| 1 | 2011-03-06 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-03-06 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | current_column: Now returns EMACS_INT, fixing some iftc. | ||
| 4 | * bytecode.c (Fbyte_code): Don't cast current_column () to int. | ||
| 5 | * cmds.c (internal_self_insert): Likewise. | ||
| 6 | * indent.c (Fcurrent_column): Likewise. | ||
| 7 | * keymap.c (describe_command): Likewise. | ||
| 8 | * minibuf.c (read_minibuf): Likewise. | ||
| 9 | * indent.c (Fcurrent_indentation): Don't cast position_indentation () | ||
| 10 | to int. | ||
| 11 | * xdisp.c (redisplay_internal, redisplay_window, decode_mode_spec): | ||
| 12 | Likewise. | ||
| 13 | * cmds.c (internal_self_insert): Declare locals to be EMACS_INT, | ||
| 14 | not int or double, if they might contain a column number. | ||
| 15 | * indent.c (current_column, Findent_to, indented_beyond_p): | ||
| 16 | (compute_motion, vmotion): Likewise. | ||
| 17 | * keymap.c (describe_command): Likewise. | ||
| 18 | * xdisp.c (pint2str): Likewise. | ||
| 19 | * indent.c (last_known_column): Now EMACS_INT, not int. | ||
| 20 | * minibuf.c (minibuf_prompt_width): Likewise. | ||
| 21 | * indent.c (current_column, current_column_1, position_indentation): | ||
| 22 | Return EMACS_INT, not double. | ||
| 23 | * lisp.h (current_column): Likewise. | ||
| 24 | * indent.c (indented_beyond_p): Last arg is now EMACS_INT, not double. | ||
| 25 | All callers changed. | ||
| 26 | * lisp.h (indented_beyond_p): Likewise. | ||
| 27 | |||
| 3 | * minibuf.c (minibuf_prompt, minibuf_prompt_width): Move here | 28 | * minibuf.c (minibuf_prompt, minibuf_prompt_width): Move here |
| 4 | from xdisp.c, and make static, since these are used only here. | 29 | from xdisp.c, and make static, since these are used only here. |
| 5 | * window.h, xdisp.c (minibuf_prompt, minibuf_prompt_width): | 30 | * window.h, xdisp.c (minibuf_prompt, minibuf_prompt_width): |
diff --git a/src/bytecode.c b/src/bytecode.c index cf4a1fc225f..bb4e87c019d 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -1323,7 +1323,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1323 | { | 1323 | { |
| 1324 | Lisp_Object v1; | 1324 | Lisp_Object v1; |
| 1325 | BEFORE_POTENTIAL_GC (); | 1325 | BEFORE_POTENTIAL_GC (); |
| 1326 | XSETFASTINT (v1, (int) current_column ()); /* iftc */ | 1326 | XSETFASTINT (v1, current_column ()); |
| 1327 | AFTER_POTENTIAL_GC (); | 1327 | AFTER_POTENTIAL_GC (); |
| 1328 | PUSH (v1); | 1328 | PUSH (v1); |
| 1329 | break; | 1329 | break; |
diff --git a/src/cmds.c b/src/cmds.c index 7e0eec99bef..5e6884c0807 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -381,19 +381,22 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 381 | { | 381 | { |
| 382 | EMACS_INT pos = PT; | 382 | EMACS_INT pos = PT; |
| 383 | EMACS_INT pos_byte = PT_BYTE; | 383 | EMACS_INT pos_byte = PT_BYTE; |
| 384 | |||
| 385 | /* FIXME: Check for integer overflow when calculating | ||
| 386 | target_clm and actual_clm. */ | ||
| 387 | |||
| 384 | /* Column the cursor should be placed at after this insertion. | 388 | /* Column the cursor should be placed at after this insertion. |
| 385 | The correct value should be calculated only when necessary. */ | 389 | The correct value should be calculated only when necessary. */ |
| 386 | int target_clm = ((int) current_column () /* iftc */ | 390 | EMACS_INT target_clm = (current_column () |
| 387 | + n * (int) XINT (Fchar_width (make_number (c)))); | 391 | + n * XINT (Fchar_width (make_number (c)))); |
| 388 | 392 | ||
| 389 | /* The actual cursor position after the trial of moving | 393 | /* The actual cursor position after the trial of moving |
| 390 | to column TARGET_CLM. It is greater than TARGET_CLM | 394 | to column TARGET_CLM. It is greater than TARGET_CLM |
| 391 | if the TARGET_CLM is middle of multi-column | 395 | if the TARGET_CLM is middle of multi-column |
| 392 | character. In that case, the new point is set after | 396 | character. In that case, the new point is set after |
| 393 | that character. */ | 397 | that character. */ |
| 394 | int actual_clm | 398 | EMACS_INT actual_clm |
| 395 | = (int) XFASTINT (Fmove_to_column (make_number (target_clm), | 399 | = XFASTINT (Fmove_to_column (make_number (target_clm), Qnil)); |
| 396 | Qnil)); | ||
| 397 | 400 | ||
| 398 | chars_to_delete = PT - pos; | 401 | chars_to_delete = PT - pos; |
| 399 | 402 | ||
diff --git a/src/indent.c b/src/indent.c index 85d26520cfb..37ce647556d 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -45,7 +45,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 45 | Some things in set last_known_column_point to -1 | 45 | Some things in set last_known_column_point to -1 |
| 46 | to mark the memorized value as invalid. */ | 46 | to mark the memorized value as invalid. */ |
| 47 | 47 | ||
| 48 | static double last_known_column; | 48 | static EMACS_INT last_known_column; |
| 49 | 49 | ||
| 50 | /* Value of point when current_column was called. */ | 50 | /* Value of point when current_column was called. */ |
| 51 | 51 | ||
| @@ -55,8 +55,8 @@ EMACS_INT last_known_column_point; | |||
| 55 | 55 | ||
| 56 | static int last_known_column_modified; | 56 | static int last_known_column_modified; |
| 57 | 57 | ||
| 58 | static double current_column_1 (void); | 58 | static EMACS_INT current_column_1 (void); |
| 59 | static double position_indentation (int); | 59 | static EMACS_INT position_indentation (int); |
| 60 | 60 | ||
| 61 | /* Cache of beginning of line found by the last call of | 61 | /* Cache of beginning of line found by the last call of |
| 62 | current_column. */ | 62 | current_column. */ |
| @@ -309,7 +309,7 @@ Text that has an invisible property is considered as having width 0, unless | |||
| 309 | (void) | 309 | (void) |
| 310 | { | 310 | { |
| 311 | Lisp_Object temp; | 311 | Lisp_Object temp; |
| 312 | XSETFASTINT (temp, (int) current_column ()); /* iftc */ | 312 | XSETFASTINT (temp, current_column ()); |
| 313 | return temp; | 313 | return temp; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| @@ -321,15 +321,15 @@ invalidate_current_column (void) | |||
| 321 | last_known_column_point = 0; | 321 | last_known_column_point = 0; |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | double | 324 | EMACS_INT |
| 325 | current_column (void) | 325 | current_column (void) |
| 326 | { | 326 | { |
| 327 | register int col; | 327 | register EMACS_INT col; |
| 328 | register unsigned char *ptr, *stop; | 328 | register unsigned char *ptr, *stop; |
| 329 | register int tab_seen; | 329 | register int tab_seen; |
| 330 | int post_tab; | 330 | EMACS_INT post_tab; |
| 331 | register int c; | 331 | register int c; |
| 332 | register int tab_width = XINT (BVAR (current_buffer, tab_width)); | 332 | register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width)); |
| 333 | int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); | 333 | int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); |
| 334 | register struct Lisp_Char_Table *dp = buffer_display_table (); | 334 | register struct Lisp_Char_Table *dp = buffer_display_table (); |
| 335 | 335 | ||
| @@ -705,7 +705,7 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) | |||
| 705 | This function handles characters that are invisible | 705 | This function handles characters that are invisible |
| 706 | due to text properties or overlays. */ | 706 | due to text properties or overlays. */ |
| 707 | 707 | ||
| 708 | static double | 708 | static EMACS_INT |
| 709 | current_column_1 (void) | 709 | current_column_1 (void) |
| 710 | { | 710 | { |
| 711 | EMACS_INT col = MOST_POSITIVE_FIXNUM; | 711 | EMACS_INT col = MOST_POSITIVE_FIXNUM; |
| @@ -807,9 +807,9 @@ even if that goes past COLUMN; by default, MINIMUM is zero. | |||
| 807 | The return value is COLUMN. */) | 807 | The return value is COLUMN. */) |
| 808 | (Lisp_Object column, Lisp_Object minimum) | 808 | (Lisp_Object column, Lisp_Object minimum) |
| 809 | { | 809 | { |
| 810 | int mincol; | 810 | EMACS_INT mincol; |
| 811 | register int fromcol; | 811 | register EMACS_INT fromcol; |
| 812 | register int tab_width = XINT (BVAR (current_buffer, tab_width)); | 812 | register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width)); |
| 813 | 813 | ||
| 814 | CHECK_NUMBER (column); | 814 | CHECK_NUMBER (column); |
| 815 | if (NILP (minimum)) | 815 | if (NILP (minimum)) |
| @@ -849,8 +849,6 @@ The return value is COLUMN. */) | |||
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | 851 | ||
| 852 | static double position_indentation (int); | ||
| 853 | |||
| 854 | DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, | 852 | DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, |
| 855 | 0, 0, 0, | 853 | 0, 0, 0, |
| 856 | doc: /* Return the indentation of the current line. | 854 | doc: /* Return the indentation of the current line. |
| @@ -863,12 +861,12 @@ following any initial whitespace. */) | |||
| 863 | 861 | ||
| 864 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); | 862 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); |
| 865 | 863 | ||
| 866 | XSETFASTINT (val, (int) position_indentation (PT_BYTE)); /* iftc */ | 864 | XSETFASTINT (val, position_indentation (PT_BYTE)); |
| 867 | SET_PT_BOTH (opoint, opoint_byte); | 865 | SET_PT_BOTH (opoint, opoint_byte); |
| 868 | return val; | 866 | return val; |
| 869 | } | 867 | } |
| 870 | 868 | ||
| 871 | static double | 869 | static EMACS_INT |
| 872 | position_indentation (register int pos_byte) | 870 | position_indentation (register int pos_byte) |
| 873 | { | 871 | { |
| 874 | register EMACS_INT column = 0; | 872 | register EMACS_INT column = 0; |
| @@ -958,9 +956,9 @@ position_indentation (register int pos_byte) | |||
| 958 | preceding line. */ | 956 | preceding line. */ |
| 959 | 957 | ||
| 960 | int | 958 | int |
| 961 | indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column) | 959 | indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT column) |
| 962 | { | 960 | { |
| 963 | double val; | 961 | EMACS_INT val; |
| 964 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; | 962 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; |
| 965 | 963 | ||
| 966 | SET_PT_BOTH (pos, pos_byte); | 964 | SET_PT_BOTH (pos, pos_byte); |
| @@ -969,7 +967,7 @@ indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column) | |||
| 969 | 967 | ||
| 970 | val = position_indentation (PT_BYTE); | 968 | val = position_indentation (PT_BYTE); |
| 971 | SET_PT_BOTH (opoint, opoint_byte); | 969 | SET_PT_BOTH (opoint, opoint_byte); |
| 972 | return val >= column; /* hmm, float comparison */ | 970 | return val >= column; |
| 973 | } | 971 | } |
| 974 | 972 | ||
| 975 | DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", | 973 | DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", |
| @@ -1126,7 +1124,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ | |||
| 1126 | register EMACS_INT tab_width = XFASTINT (BVAR (current_buffer, tab_width)); | 1124 | register EMACS_INT tab_width = XFASTINT (BVAR (current_buffer, tab_width)); |
| 1127 | register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); | 1125 | register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); |
| 1128 | register struct Lisp_Char_Table *dp = window_display_table (win); | 1126 | register struct Lisp_Char_Table *dp = window_display_table (win); |
| 1129 | int selective | 1127 | EMACS_INT selective |
| 1130 | = (INTEGERP (BVAR (current_buffer, selective_display)) | 1128 | = (INTEGERP (BVAR (current_buffer, selective_display)) |
| 1131 | ? XINT (BVAR (current_buffer, selective_display)) | 1129 | ? XINT (BVAR (current_buffer, selective_display)) |
| 1132 | : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); | 1130 | : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); |
| @@ -1590,8 +1588,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ | |||
| 1590 | else if (c == '\n') | 1588 | else if (c == '\n') |
| 1591 | { | 1589 | { |
| 1592 | if (selective > 0 | 1590 | if (selective > 0 |
| 1593 | && indented_beyond_p (pos, pos_byte, | 1591 | && indented_beyond_p (pos, pos_byte, selective)) |
| 1594 | (double) selective)) /* iftc */ | ||
| 1595 | { | 1592 | { |
| 1596 | /* If (pos == to), we don't have to take care of | 1593 | /* If (pos == to), we don't have to take care of |
| 1597 | selective display. */ | 1594 | selective display. */ |
| @@ -1607,7 +1604,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ | |||
| 1607 | } | 1604 | } |
| 1608 | while (pos < to | 1605 | while (pos < to |
| 1609 | && indented_beyond_p (pos, pos_byte, | 1606 | && indented_beyond_p (pos, pos_byte, |
| 1610 | (double) selective)); /* iftc */ | 1607 | selective)); |
| 1611 | /* Allow for the " ..." that is displayed for them. */ | 1608 | /* Allow for the " ..." that is displayed for them. */ |
| 1612 | if (selective_rlen) | 1609 | if (selective_rlen) |
| 1613 | { | 1610 | { |
| @@ -1837,7 +1834,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) | |||
| 1837 | register EMACS_INT first; | 1834 | register EMACS_INT first; |
| 1838 | EMACS_INT from_byte; | 1835 | EMACS_INT from_byte; |
| 1839 | EMACS_INT lmargin = hscroll > 0 ? 1 - hscroll : 0; | 1836 | EMACS_INT lmargin = hscroll > 0 ? 1 - hscroll : 0; |
| 1840 | int selective | 1837 | EMACS_INT selective |
| 1841 | = (INTEGERP (BVAR (current_buffer, selective_display)) | 1838 | = (INTEGERP (BVAR (current_buffer, selective_display)) |
| 1842 | ? XINT (BVAR (current_buffer, selective_display)) | 1839 | ? XINT (BVAR (current_buffer, selective_display)) |
| 1843 | : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); | 1840 | : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); |
| @@ -1872,7 +1869,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) | |||
| 1872 | && ((selective > 0 | 1869 | && ((selective > 0 |
| 1873 | && indented_beyond_p (prevline, | 1870 | && indented_beyond_p (prevline, |
| 1874 | CHAR_TO_BYTE (prevline), | 1871 | CHAR_TO_BYTE (prevline), |
| 1875 | (double) selective)) /* iftc */ | 1872 | selective)) |
| 1876 | /* Watch out for newlines with `invisible' property. | 1873 | /* Watch out for newlines with `invisible' property. |
| 1877 | When moving upward, check the newline before. */ | 1874 | When moving upward, check the newline before. */ |
| 1878 | || (propval = Fget_char_property (make_number (prevline - 1), | 1875 | || (propval = Fget_char_property (make_number (prevline - 1), |
| @@ -1929,7 +1926,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) | |||
| 1929 | && ((selective > 0 | 1926 | && ((selective > 0 |
| 1930 | && indented_beyond_p (prevline, | 1927 | && indented_beyond_p (prevline, |
| 1931 | CHAR_TO_BYTE (prevline), | 1928 | CHAR_TO_BYTE (prevline), |
| 1932 | (double) selective)) /* iftc */ | 1929 | selective)) |
| 1933 | /* Watch out for newlines with `invisible' property. | 1930 | /* Watch out for newlines with `invisible' property. |
| 1934 | When moving downward, check the newline after. */ | 1931 | When moving downward, check the newline after. */ |
| 1935 | || (propval = Fget_char_property (make_number (prevline), | 1932 | || (propval = Fget_char_property (make_number (prevline), |
diff --git a/src/keymap.c b/src/keymap.c index 1fbb40f1270..4459ef07d68 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3219,7 +3219,7 @@ static void | |||
| 3219 | describe_command (Lisp_Object definition, Lisp_Object args) | 3219 | describe_command (Lisp_Object definition, Lisp_Object args) |
| 3220 | { | 3220 | { |
| 3221 | register Lisp_Object tem1; | 3221 | register Lisp_Object tem1; |
| 3222 | int column = (int) current_column (); /* iftc */ | 3222 | EMACS_INT column = current_column (); |
| 3223 | int description_column; | 3223 | int description_column; |
| 3224 | 3224 | ||
| 3225 | /* If column 16 is no good, go to col 32; | 3225 | /* If column 16 is no good, go to col 32; |
diff --git a/src/lisp.h b/src/lisp.h index 82c4f65613d..e38d6a8ec3c 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3145,9 +3145,9 @@ extern char *push_key_description (unsigned int, char *, int); | |||
| 3145 | EXFUN (Fvertical_motion, 2); | 3145 | EXFUN (Fvertical_motion, 2); |
| 3146 | EXFUN (Findent_to, 2); | 3146 | EXFUN (Findent_to, 2); |
| 3147 | EXFUN (Fmove_to_column, 2); | 3147 | EXFUN (Fmove_to_column, 2); |
| 3148 | extern double current_column (void); | 3148 | extern EMACS_INT current_column (void); |
| 3149 | extern void invalidate_current_column (void); | 3149 | extern void invalidate_current_column (void); |
| 3150 | extern int indented_beyond_p (EMACS_INT, EMACS_INT, double); | 3150 | extern int indented_beyond_p (EMACS_INT, EMACS_INT, EMACS_INT); |
| 3151 | extern void syms_of_indent (void); | 3151 | extern void syms_of_indent (void); |
| 3152 | 3152 | ||
| 3153 | /* Defined in frame.c */ | 3153 | /* Defined in frame.c */ |
diff --git a/src/minibuf.c b/src/minibuf.c index a56ed679a51..83587b53b73 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -89,7 +89,7 @@ static Lisp_Object minibuf_prompt; | |||
| 89 | /* Width of current mini-buffer prompt. Only set after display_line | 89 | /* Width of current mini-buffer prompt. Only set after display_line |
| 90 | of the line that contains the prompt. */ | 90 | of the line that contains the prompt. */ |
| 91 | 91 | ||
| 92 | static int minibuf_prompt_width; | 92 | static EMACS_INT minibuf_prompt_width; |
| 93 | 93 | ||
| 94 | 94 | ||
| 95 | /* Put minibuf on currently selected frame's minibuffer. | 95 | /* Put minibuf on currently selected frame's minibuffer. |
| @@ -632,7 +632,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 632 | unbind_to (count1, Qnil); | 632 | unbind_to (count1, Qnil); |
| 633 | } | 633 | } |
| 634 | 634 | ||
| 635 | minibuf_prompt_width = (int) current_column (); /* iftc */ | 635 | minibuf_prompt_width = current_column (); |
| 636 | 636 | ||
| 637 | /* Put in the initial input. */ | 637 | /* Put in the initial input. */ |
| 638 | if (!NILP (initial)) | 638 | if (!NILP (initial)) |
diff --git a/src/xdisp.c b/src/xdisp.c index c8ec74ea7b0..44cb7130119 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -762,7 +762,7 @@ static Lisp_Object get_it_property (struct it *it, Lisp_Object prop); | |||
| 762 | 762 | ||
| 763 | static void handle_line_prefix (struct it *); | 763 | static void handle_line_prefix (struct it *); |
| 764 | 764 | ||
| 765 | static void pint2str (char *, int, int); | 765 | static void pint2str (char *, int, EMACS_INT); |
| 766 | static void pint2hrstr (char *, int, int); | 766 | static void pint2hrstr (char *, int, int); |
| 767 | static struct text_pos run_window_scroll_functions (Lisp_Object, | 767 | static struct text_pos run_window_scroll_functions (Lisp_Object, |
| 768 | struct text_pos); | 768 | struct text_pos); |
| @@ -11579,8 +11579,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 11579 | && !(PT == XFASTINT (w->last_point) | 11579 | && !(PT == XFASTINT (w->last_point) |
| 11580 | && XFASTINT (w->last_modified) >= MODIFF | 11580 | && XFASTINT (w->last_modified) >= MODIFF |
| 11581 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) | 11581 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) |
| 11582 | && (XFASTINT (w->column_number_displayed) | 11582 | && (XFASTINT (w->column_number_displayed) != current_column ())) |
| 11583 | != (int) current_column ())) /* iftc */ | ||
| 11584 | w->update_mode_line = Qt; | 11583 | w->update_mode_line = Qt; |
| 11585 | 11584 | ||
| 11586 | unbind_to (count1, Qnil); | 11585 | unbind_to (count1, Qnil); |
| @@ -13819,8 +13818,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 13819 | && !(PT == XFASTINT (w->last_point) | 13818 | && !(PT == XFASTINT (w->last_point) |
| 13820 | && XFASTINT (w->last_modified) >= MODIFF | 13819 | && XFASTINT (w->last_modified) >= MODIFF |
| 13821 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) | 13820 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) |
| 13822 | && (XFASTINT (w->column_number_displayed) | 13821 | && (XFASTINT (w->column_number_displayed) != current_column ())) |
| 13823 | != (int) current_column ())) /* iftc */ | ||
| 13824 | update_mode_line = 1; | 13822 | update_mode_line = 1; |
| 13825 | 13823 | ||
| 13826 | /* Count number of windows showing the selected buffer. An indirect | 13824 | /* Count number of windows showing the selected buffer. An indirect |
| @@ -14328,8 +14326,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 14328 | || INTEGERP (w->base_line_pos) | 14326 | || INTEGERP (w->base_line_pos) |
| 14329 | /* Column number is displayed and different from the one displayed. */ | 14327 | /* Column number is displayed and different from the one displayed. */ |
| 14330 | || (!NILP (w->column_number_displayed) | 14328 | || (!NILP (w->column_number_displayed) |
| 14331 | && (XFASTINT (w->column_number_displayed) | 14329 | && (XFASTINT (w->column_number_displayed) != current_column ()))) |
| 14332 | != (int) current_column ()))) /* iftc */ | ||
| 14333 | /* This means that the window has a mode line. */ | 14330 | /* This means that the window has a mode line. */ |
| 14334 | && (WINDOW_WANTS_MODELINE_P (w) | 14331 | && (WINDOW_WANTS_MODELINE_P (w) |
| 14335 | || WINDOW_WANTS_HEADER_LINE_P (w))) | 14332 | || WINDOW_WANTS_HEADER_LINE_P (w))) |
| @@ -18983,7 +18980,7 @@ are the selected window and the WINDOW's buffer). */) | |||
| 18983 | the positive integer D to BUF using a minimal field width WIDTH. */ | 18980 | the positive integer D to BUF using a minimal field width WIDTH. */ |
| 18984 | 18981 | ||
| 18985 | static void | 18982 | static void |
| 18986 | pint2str (register char *buf, register int width, register int d) | 18983 | pint2str (register char *buf, register int width, register EMACS_INT d) |
| 18987 | { | 18984 | { |
| 18988 | register char *p = buf; | 18985 | register char *p = buf; |
| 18989 | 18986 | ||
| @@ -19312,7 +19309,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 19312 | return ""; | 19309 | return ""; |
| 19313 | else | 19310 | else |
| 19314 | { | 19311 | { |
| 19315 | int col = (int) current_column (); /* iftc */ | 19312 | EMACS_INT col = current_column (); |
| 19316 | w->column_number_displayed = make_number (col); | 19313 | w->column_number_displayed = make_number (col); |
| 19317 | pint2str (decode_mode_spec_buf, field_width, col); | 19314 | pint2str (decode_mode_spec_buf, field_width, col); |
| 19318 | return decode_mode_spec_buf; | 19315 | return decode_mode_spec_buf; |