aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-06 02:53:51 -0800
committerPaul Eggert2011-03-06 02:53:51 -0800
commit5f349a895b72500a6a33d6610195f7141cf8252f (patch)
treebb1207756d00ad0133f8299ebe95c56ceda97213 /src
parent1e12733b25bfa52650157c34fc30a9c7fe1d5b4c (diff)
parent7831777b8a9e8d2f68bd17058359ea8849d66f70 (diff)
downloademacs-5f349a895b72500a6a33d6610195f7141cf8252f.tar.gz
emacs-5f349a895b72500a6a33d6610195f7141cf8252f.zip
Merge: current_column: Now returns EMACS_INT, fixing some iftc
that was introduced in the 2002-06-02 change "temporarily"; see <http://lists.gnu.org/archive/html/emacs-devel/2002-06/msg00039.html>. * 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. * minibuf.c (minibuf_prompt, minibuf_prompt_width): Move here from xdisp.c, and make static, since these are used only here. * window.h, xdisp.c (minibuf_prompt, minibuf_prompt_width): Remove decls. * xdisp.c (redisplay_window): Reindent to match Emacs style.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog33
-rw-r--r--src/bytecode.c2
-rw-r--r--src/cmds.c13
-rw-r--r--src/indent.c49
-rw-r--r--src/keymap.c2
-rw-r--r--src/lisp.h4
-rw-r--r--src/minibuf.c11
-rw-r--r--src/window.h9
-rw-r--r--src/xdisp.c30
9 files changed, 87 insertions, 66 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 357bb9a37a8..a96edcdfdca 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,39 @@
12011-03-06 Paul Eggert <eggert@cs.ucla.edu> 12011-03-06 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 current_column: Now returns EMACS_INT, fixing some iftc
4 that was introduced in the 2002-06-02 change "temporarily"; see
5 <http://lists.gnu.org/archive/html/emacs-devel/2002-06/msg00039.html>.
6 * bytecode.c (Fbyte_code): Don't cast current_column () to int.
7 * cmds.c (internal_self_insert): Likewise.
8 * indent.c (Fcurrent_column): Likewise.
9 * keymap.c (describe_command): Likewise.
10 * minibuf.c (read_minibuf): Likewise.
11 * indent.c (Fcurrent_indentation): Don't cast position_indentation ()
12 to int.
13 * xdisp.c (redisplay_internal, redisplay_window, decode_mode_spec):
14 Likewise.
15 * cmds.c (internal_self_insert): Declare locals to be EMACS_INT,
16 not int or double, if they might contain a column number.
17 * indent.c (current_column, Findent_to, indented_beyond_p):
18 (compute_motion, vmotion): Likewise.
19 * keymap.c (describe_command): Likewise.
20 * xdisp.c (pint2str): Likewise.
21 * indent.c (last_known_column): Now EMACS_INT, not int.
22 * minibuf.c (minibuf_prompt_width): Likewise.
23 * indent.c (current_column, current_column_1, position_indentation):
24 Return EMACS_INT, not double.
25 * lisp.h (current_column): Likewise.
26 * indent.c (indented_beyond_p): Last arg is now EMACS_INT, not double.
27 All callers changed.
28 * lisp.h (indented_beyond_p): Likewise.
29
30 * minibuf.c (minibuf_prompt, minibuf_prompt_width): Move here
31 from xdisp.c, and make static, since these are used only here.
32 * window.h, xdisp.c (minibuf_prompt, minibuf_prompt_width):
33 Remove decls.
34
3 * cmds.c (internal_self_insert): Reindent to match Emacs style. 35 * cmds.c (internal_self_insert): Reindent to match Emacs style.
36 * xdisp.c (redisplay_window): Likewise.
4 37
5 * xdisp.c: Rename or move local decls to avoid shadowing. 38 * xdisp.c: Rename or move local decls to avoid shadowing.
6 (init_iterator, handle_fontified_prop, handle_single_display_spec): 39 (init_iterator, handle_fontified_prop, handle_single_display_spec):
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
48static double last_known_column; 48static 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
56static int last_known_column_modified; 56static int last_known_column_modified;
57 57
58static double current_column_1 (void); 58static EMACS_INT current_column_1 (void);
59static double position_indentation (int); 59static 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
324double 324EMACS_INT
325current_column (void) 325current_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
708static double 708static EMACS_INT
709current_column_1 (void) 709current_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.
807The return value is COLUMN. */) 807The 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
852static double position_indentation (int);
853
854DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, 852DEFUN ("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
871static double 869static EMACS_INT
872position_indentation (register int pos_byte) 870position_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
960int 958int
961indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column) 959indented_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
975DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", 973DEFUN ("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
3219describe_command (Lisp_Object definition, Lisp_Object args) 3219describe_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);
3145EXFUN (Fvertical_motion, 2); 3145EXFUN (Fvertical_motion, 2);
3146EXFUN (Findent_to, 2); 3146EXFUN (Findent_to, 2);
3147EXFUN (Fmove_to_column, 2); 3147EXFUN (Fmove_to_column, 2);
3148extern double current_column (void); 3148extern EMACS_INT current_column (void);
3149extern void invalidate_current_column (void); 3149extern void invalidate_current_column (void);
3150extern int indented_beyond_p (EMACS_INT, EMACS_INT, double); 3150extern int indented_beyond_p (EMACS_INT, EMACS_INT, EMACS_INT);
3151extern void syms_of_indent (void); 3151extern 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 4b709bd9cbd..83587b53b73 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -82,6 +82,15 @@ Lisp_Object Qcase_fold_search;
82 82
83Lisp_Object Qread_expression_history; 83Lisp_Object Qread_expression_history;
84 84
85/* Prompt to display in front of the mini-buffer contents. */
86
87static Lisp_Object minibuf_prompt;
88
89/* Width of current mini-buffer prompt. Only set after display_line
90 of the line that contains the prompt. */
91
92static EMACS_INT minibuf_prompt_width;
93
85 94
86/* Put minibuf on currently selected frame's minibuffer. 95/* Put minibuf on currently selected frame's minibuffer.
87 We do this whenever the user starts a new minibuffer 96 We do this whenever the user starts a new minibuffer
@@ -623,7 +632,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
623 unbind_to (count1, Qnil); 632 unbind_to (count1, Qnil);
624 } 633 }
625 634
626 minibuf_prompt_width = (int) current_column (); /* iftc */ 635 minibuf_prompt_width = current_column ();
627 636
628 /* Put in the initial input. */ 637 /* Put in the initial input. */
629 if (!NILP (initial)) 638 if (!NILP (initial))
diff --git a/src/window.h b/src/window.h
index 491ffa30bd1..690fd9a50fa 100644
--- a/src/window.h
+++ b/src/window.h
@@ -788,14 +788,6 @@ void run_window_configuration_change_hook (struct frame *f);
788void set_window_buffer (Lisp_Object window, Lisp_Object buffer, 788void set_window_buffer (Lisp_Object window, Lisp_Object buffer,
789 int run_hooks_p, int keep_margins_p); 789 int run_hooks_p, int keep_margins_p);
790 790
791/* Prompt to display in front of the minibuffer contents. */
792
793extern Lisp_Object minibuf_prompt;
794
795/* The visual width of the above. */
796
797extern int minibuf_prompt_width;
798
799/* This is the window where the echo area message was displayed. It 791/* This is the window where the echo area message was displayed. It
800 is always a minibuffer window, but it may not be the same window 792 is always a minibuffer window, but it may not be the same window
801 currently active as a minibuffer. */ 793 currently active as a minibuffer. */
@@ -878,4 +870,3 @@ extern void keys_of_window (void);
878extern int window_box_text_cols (struct window *w); 870extern int window_box_text_cols (struct window *w);
879 871
880#endif /* not WINDOW_H_INCLUDED */ 872#endif /* not WINDOW_H_INCLUDED */
881
diff --git a/src/xdisp.c b/src/xdisp.c
index 4c1e906c04c..44cb7130119 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -483,15 +483,6 @@ int buffer_shared;
483 483
484static Lisp_Object default_invis_vector[3]; 484static Lisp_Object default_invis_vector[3];
485 485
486/* Prompt to display in front of the mini-buffer contents. */
487
488Lisp_Object minibuf_prompt;
489
490/* Width of current mini-buffer prompt. Only set after display_line
491 of the line that contains the prompt. */
492
493int minibuf_prompt_width;
494
495/* This is the window where the echo area message was displayed. It 486/* This is the window where the echo area message was displayed. It
496 is always a mini-buffer window, but it may not be the same window 487 is always a mini-buffer window, but it may not be the same window
497 currently active as a mini-buffer. */ 488 currently active as a mini-buffer. */
@@ -771,7 +762,7 @@ static Lisp_Object get_it_property (struct it *it, Lisp_Object prop);
771 762
772static void handle_line_prefix (struct it *); 763static void handle_line_prefix (struct it *);
773 764
774static void pint2str (char *, int, int); 765static void pint2str (char *, int, EMACS_INT);
775static void pint2hrstr (char *, int, int); 766static void pint2hrstr (char *, int, int);
776static struct text_pos run_window_scroll_functions (Lisp_Object, 767static struct text_pos run_window_scroll_functions (Lisp_Object,
777 struct text_pos); 768 struct text_pos);
@@ -11588,8 +11579,7 @@ redisplay_internal (int preserve_echo_area)
11588 && !(PT == XFASTINT (w->last_point) 11579 && !(PT == XFASTINT (w->last_point)
11589 && XFASTINT (w->last_modified) >= MODIFF 11580 && XFASTINT (w->last_modified) >= MODIFF
11590 && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) 11581 && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
11591 && (XFASTINT (w->column_number_displayed) 11582 && (XFASTINT (w->column_number_displayed) != current_column ()))
11592 != (int) current_column ())) /* iftc */
11593 w->update_mode_line = Qt; 11583 w->update_mode_line = Qt;
11594 11584
11595 unbind_to (count1, Qnil); 11585 unbind_to (count1, Qnil);
@@ -13828,8 +13818,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
13828 && !(PT == XFASTINT (w->last_point) 13818 && !(PT == XFASTINT (w->last_point)
13829 && XFASTINT (w->last_modified) >= MODIFF 13819 && XFASTINT (w->last_modified) >= MODIFF
13830 && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) 13820 && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
13831 && (XFASTINT (w->column_number_displayed) 13821 && (XFASTINT (w->column_number_displayed) != current_column ()))
13832 != (int) current_column ())) /* iftc */
13833 update_mode_line = 1; 13822 update_mode_line = 1;
13834 13823
13835 /* Count number of windows showing the selected buffer. An indirect 13824 /* Count number of windows showing the selected buffer. An indirect
@@ -14337,11 +14326,10 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
14337 || INTEGERP (w->base_line_pos) 14326 || INTEGERP (w->base_line_pos)
14338 /* Column number is displayed and different from the one displayed. */ 14327 /* Column number is displayed and different from the one displayed. */
14339 || (!NILP (w->column_number_displayed) 14328 || (!NILP (w->column_number_displayed)
14340 && (XFASTINT (w->column_number_displayed) 14329 && (XFASTINT (w->column_number_displayed) != current_column ())))
14341 != (int) current_column ()))) /* iftc */ 14330 /* This means that the window has a mode line. */
14342 /* This means that the window has a mode line. */ 14331 && (WINDOW_WANTS_MODELINE_P (w)
14343 && (WINDOW_WANTS_MODELINE_P (w) 14332 || WINDOW_WANTS_HEADER_LINE_P (w)))
14344 || WINDOW_WANTS_HEADER_LINE_P (w)))
14345 { 14333 {
14346 display_mode_lines (w); 14334 display_mode_lines (w);
14347 14335
@@ -18992,7 +18980,7 @@ are the selected window and the WINDOW's buffer). */)
18992 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. */
18993 18981
18994static void 18982static void
18995pint2str (register char *buf, register int width, register int d) 18983pint2str (register char *buf, register int width, register EMACS_INT d)
18996{ 18984{
18997 register char *p = buf; 18985 register char *p = buf;
18998 18986
@@ -19321,7 +19309,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
19321 return ""; 19309 return "";
19322 else 19310 else
19323 { 19311 {
19324 int col = (int) current_column (); /* iftc */ 19312 EMACS_INT col = current_column ();
19325 w->column_number_displayed = make_number (col); 19313 w->column_number_displayed = make_number (col);
19326 pint2str (decode_mode_spec_buf, field_width, col); 19314 pint2str (decode_mode_spec_buf, field_width, col);
19327 return decode_mode_spec_buf; 19315 return decode_mode_spec_buf;