aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-04-06 06:57:24 +0000
committerKarl Heuer1994-04-06 06:57:24 +0000
commitae3b1442ce05e69d6c32c6a1a10fb56a7b384230 (patch)
tree1cd5695b17dcd19391d6cbdca28ef0b064fa4e93 /src
parentbd5dec8e9b161582d18b11d7d5634e17835fe72a (diff)
downloademacs-ae3b1442ce05e69d6c32c6a1a10fb56a7b384230.tar.gz
emacs-ae3b1442ce05e69d6c32c6a1a10fb56a7b384230.zip
Use PT, not point.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 3effdc3066a..8b762bea4d9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -593,8 +593,8 @@ redisplay ()
593 && current_buffer == XBUFFER (w->buffer) 593 && current_buffer == XBUFFER (w->buffer)
594 && NILP (w->force_start) 594 && NILP (w->force_start)
595 /* Point must be on the line that we have info recorded about */ 595 /* Point must be on the line that we have info recorded about */
596 && point >= tlbufpos 596 && PT >= tlbufpos
597 && point <= Z - tlendpos 597 && PT <= Z - tlendpos
598 /* All text outside that line, including its final newline, 598 /* All text outside that line, including its final newline,
599 must be unchanged */ 599 must be unchanged */
600 && (XFASTINT (w->last_modified) >= MODIFF 600 && (XFASTINT (w->last_modified) >= MODIFF
@@ -658,7 +658,7 @@ redisplay ()
658 else 658 else
659 goto cancel; 659 goto cancel;
660 } 660 }
661 else if (point == XFASTINT (w->last_point)) 661 else if (PT == XFASTINT (w->last_point))
662 { 662 {
663 if (!must_finish) 663 if (!must_finish)
664 { 664 {
@@ -674,7 +674,7 @@ redisplay ()
674 { 674 {
675 pos = *compute_motion (tlbufpos, 0, 675 pos = *compute_motion (tlbufpos, 0,
676 XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0, 676 XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0,
677 point, 2, - (1 << (SHORTBITS - 1)), 677 PT, 2, - (1 << (SHORTBITS - 1)),
678 window_internal_width (w) - 1, 678 window_internal_width (w) - 1,
679 XINT (w->hscroll), 679 XINT (w->hscroll),
680 pos_tab_offset (w, tlbufpos), w); 680 pos_tab_offset (w, tlbufpos), w);
@@ -1028,13 +1028,13 @@ redisplay_window (window, just_this_one)
1028 register struct window *w = XWINDOW (window); 1028 register struct window *w = XWINDOW (window);
1029 FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); 1029 FRAME_PTR f = XFRAME (WINDOW_FRAME (w));
1030 int height; 1030 int height;
1031 register int lpoint = point; 1031 register int lpoint = PT;
1032 struct buffer *old = current_buffer; 1032 struct buffer *old = current_buffer;
1033 register int width = window_internal_width (w) - 1; 1033 register int width = window_internal_width (w) - 1;
1034 register int startp; 1034 register int startp;
1035 register int hscroll = XINT (w->hscroll); 1035 register int hscroll = XINT (w->hscroll);
1036 struct position pos; 1036 struct position pos;
1037 int opoint = point; 1037 int opoint = PT;
1038 int tem; 1038 int tem;
1039 int window_needs_modeline; 1039 int window_needs_modeline;
1040 1040
@@ -1088,7 +1088,7 @@ redisplay_window (window, just_this_one)
1088 /* Otherwise set up data on this window; select its buffer and point value */ 1088 /* Otherwise set up data on this window; select its buffer and point value */
1089 1089
1090 current_buffer = XBUFFER (w->buffer); 1090 current_buffer = XBUFFER (w->buffer);
1091 opoint = point; 1091 opoint = PT;
1092 1092
1093 /* Count number of windows showing the selected buffer. */ 1093 /* Count number of windows showing the selected buffer. */
1094 1094
@@ -1102,15 +1102,15 @@ redisplay_window (window, just_this_one)
1102 if (!EQ (window, selected_window)) 1102 if (!EQ (window, selected_window))
1103 { 1103 {
1104 SET_PT (marker_position (w->pointm)); 1104 SET_PT (marker_position (w->pointm));
1105 if (point < BEGV) 1105 if (PT < BEGV)
1106 { 1106 {
1107 SET_PT (BEGV); 1107 SET_PT (BEGV);
1108 Fset_marker (w->pointm, make_number (point), Qnil); 1108 Fset_marker (w->pointm, make_number (PT), Qnil);
1109 } 1109 }
1110 else if (point > (ZV - 1)) 1110 else if (PT > (ZV - 1))
1111 { 1111 {
1112 SET_PT (ZV); 1112 SET_PT (ZV);
1113 Fset_marker (w->pointm, make_number (point), Qnil); 1113 Fset_marker (w->pointm, make_number (PT), Qnil);
1114 } 1114 }
1115 } 1115 }
1116 1116
@@ -1146,11 +1146,11 @@ redisplay_window (window, just_this_one)
1146 width, hscroll, pos_tab_offset (w, startp), w); 1146 width, hscroll, pos_tab_offset (w, startp), w);
1147 SET_PT (pos.bufpos); 1147 SET_PT (pos.bufpos);
1148 if (w != XWINDOW (selected_window)) 1148 if (w != XWINDOW (selected_window))
1149 Fset_marker (w->pointm, make_number (point), Qnil); 1149 Fset_marker (w->pointm, make_number (PT), Qnil);
1150 else 1150 else
1151 { 1151 {
1152 if (current_buffer == old) 1152 if (current_buffer == old)
1153 lpoint = point; 1153 lpoint = PT;
1154 FRAME_CURSOR_X (f) = max (0, pos.hpos) + XFASTINT (w->left); 1154 FRAME_CURSOR_X (f) = max (0, pos.hpos) + XFASTINT (w->left);
1155 FRAME_CURSOR_Y (f) = pos.vpos + XFASTINT (w->top); 1155 FRAME_CURSOR_Y (f) = pos.vpos + XFASTINT (w->top);
1156 } 1156 }
@@ -1169,7 +1169,7 @@ redisplay_window (window, just_this_one)
1169 in redisplay handles the same cases. */ 1169 in redisplay handles the same cases. */
1170 1170
1171 if (XFASTINT (w->last_modified) >= MODIFF 1171 if (XFASTINT (w->last_modified) >= MODIFF
1172 && point >= startp && !clip_changed 1172 && PT >= startp && !clip_changed
1173 && (just_this_one || XFASTINT (w->width) == FRAME_WIDTH (f)) 1173 && (just_this_one || XFASTINT (w->width) == FRAME_WIDTH (f))
1174 /* Can't use this case if highlighting a region. */ 1174 /* Can't use this case if highlighting a region. */
1175 && !(!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active)) 1175 && !(!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active))
@@ -1177,7 +1177,7 @@ redisplay_window (window, just_this_one)
1177 && !EQ (window, minibuf_window)) 1177 && !EQ (window, minibuf_window))
1178 { 1178 {
1179 pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0), 1179 pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0),
1180 point, height + 1, 10000, width, hscroll, 1180 PT, height + 1, 10000, width, hscroll,
1181 pos_tab_offset (w, startp), w); 1181 pos_tab_offset (w, startp), w);
1182 1182
1183 if (pos.vpos < height) 1183 if (pos.vpos < height)
@@ -1210,7 +1210,7 @@ redisplay_window (window, just_this_one)
1210 goto recenter; 1210 goto recenter;
1211 } 1211 }
1212 else if (just_this_one && !MINI_WINDOW_P (w) 1212 else if (just_this_one && !MINI_WINDOW_P (w)
1213 && point >= startp 1213 && PT >= startp
1214 && XFASTINT (w->last_modified) 1214 && XFASTINT (w->last_modified)
1215 /* or else vmotion on first line won't work. */ 1215 /* or else vmotion on first line won't work. */
1216 && ! NILP (w->start_at_line_beg) 1216 && ! NILP (w->start_at_line_beg)
@@ -1260,7 +1260,7 @@ redisplay_window (window, just_this_one)
1260 1260
1261 if (scroll_step && !clip_changed) 1261 if (scroll_step && !clip_changed)
1262 { 1262 {
1263 if (point > startp) 1263 if (PT > startp)
1264 { 1264 {
1265 pos = *vmotion (Z - XFASTINT (w->window_end_pos), 1265 pos = *vmotion (Z - XFASTINT (w->window_end_pos),
1266 scroll_step, width, hscroll, window); 1266 scroll_step, width, hscroll, window);
@@ -1268,10 +1268,10 @@ redisplay_window (window, just_this_one)
1268 goto scroll_fail; 1268 goto scroll_fail;
1269 } 1269 }
1270 1270
1271 pos = *vmotion (startp, point < startp ? - scroll_step : scroll_step, 1271 pos = *vmotion (startp, PT < startp ? - scroll_step : scroll_step,
1272 width, hscroll, window); 1272 width, hscroll, window);
1273 1273
1274 if (point >= pos.bufpos) 1274 if (PT >= pos.bufpos)
1275 { 1275 {
1276 try_window (window, pos.bufpos); 1276 try_window (window, pos.bufpos);
1277 if (cursor_vpos >= 0) 1277 if (cursor_vpos >= 0)
@@ -1293,7 +1293,7 @@ recenter:
1293 /* Forget any previously recorded base line for line number display. */ 1293 /* Forget any previously recorded base line for line number display. */
1294 w->base_line_number = Qnil; 1294 w->base_line_number = Qnil;
1295 1295
1296 pos = *vmotion (point, - (height / 2), width, hscroll, window); 1296 pos = *vmotion (PT, - (height / 2), width, hscroll, window);
1297 try_window (window, pos.bufpos); 1297 try_window (window, pos.bufpos);
1298 1298
1299 startp = marker_position (w->start); 1299 startp = marker_position (w->start);
@@ -1470,7 +1470,7 @@ try_window_id (window)
1470 width, hscroll, pos_tab_offset (w, start), w); 1470 width, hscroll, pos_tab_offset (w, start), w);
1471 if (bp.vpos >= height) 1471 if (bp.vpos >= height)
1472 { 1472 {
1473 if (point < bp.bufpos && !bp.contin) 1473 if (PT < bp.bufpos && !bp.contin)
1474 { 1474 {
1475 /* All changes are below the frame, and point is on the frame. 1475 /* All changes are below the frame, and point is on the frame.
1476 We don't need to change the frame at all. 1476 We don't need to change the frame at all.
@@ -1574,22 +1574,22 @@ try_window_id (window)
1574 XFASTINT (w->window_end_vpos) += scroll_amount; 1574 XFASTINT (w->window_end_vpos) += scroll_amount;
1575 1575
1576 /* Before doing any scrolling, verify that point will be on frame. */ 1576 /* Before doing any scrolling, verify that point will be on frame. */
1577 if (point > ep.bufpos && !(point <= xp.bufpos && xp.bufpos < height)) 1577 if (PT > ep.bufpos && !(PT <= xp.bufpos && xp.bufpos < height))
1578 { 1578 {
1579 if (point <= xp.bufpos) 1579 if (PT <= xp.bufpos)
1580 { 1580 {
1581 pp = *compute_motion (ep.bufpos, ep.vpos, ep.hpos, 1581 pp = *compute_motion (ep.bufpos, ep.vpos, ep.hpos,
1582 point, height, - (1 << (SHORTBITS - 1)), 1582 PT, height, - (1 << (SHORTBITS - 1)),
1583 width, hscroll, epto, w); 1583 width, hscroll, epto, w);
1584 } 1584 }
1585 else 1585 else
1586 { 1586 {
1587 pp = *compute_motion (xp.bufpos, xp.vpos, xp.hpos, 1587 pp = *compute_motion (xp.bufpos, xp.vpos, xp.hpos,
1588 point, height, - (1 << (SHORTBITS - 1)), 1588 PT, height, - (1 << (SHORTBITS - 1)),
1589 width, hscroll, 1589 width, hscroll,
1590 pos_tab_offset (w, xp.bufpos), w); 1590 pos_tab_offset (w, xp.bufpos), w);
1591 } 1591 }
1592 if (pp.bufpos < point || pp.vpos == height) 1592 if (pp.bufpos < PT || pp.vpos == height)
1593 return 0; 1593 return 0;
1594 cursor_vpos = pp.vpos + top; 1594 cursor_vpos = pp.vpos + top;
1595 cursor_hpos = pp.hpos + XFASTINT (w->left); 1595 cursor_hpos = pp.hpos + XFASTINT (w->left);
@@ -1757,7 +1757,7 @@ try_window_id (window)
1757 /* Here is a case where display_text_line sets cursor_vpos wrong. 1757 /* Here is a case where display_text_line sets cursor_vpos wrong.
1758 Make it be fixed up, below. */ 1758 Make it be fixed up, below. */
1759 if (xp.bufpos == ZV 1759 if (xp.bufpos == ZV
1760 && xp.bufpos == point) 1760 && xp.bufpos == PT)
1761 cursor_vpos = -1; 1761 cursor_vpos = -1;
1762 } 1762 }
1763 1763
@@ -1786,7 +1786,7 @@ try_window_id (window)
1786 /* If point was not in a line that was displayed, find it */ 1786 /* If point was not in a line that was displayed, find it */
1787 if (cursor_vpos < 0) 1787 if (cursor_vpos < 0)
1788 { 1788 {
1789 val = *compute_motion (start, 0, lmargin, point, 10000, 10000, 1789 val = *compute_motion (start, 0, lmargin, PT, 10000, 10000,
1790 width, hscroll, pos_tab_offset (w, start), w); 1790 width, hscroll, pos_tab_offset (w, start), w);
1791 /* Admit failure if point is off frame now */ 1791 /* Admit failure if point is off frame now */
1792 if (val.vpos >= height) 1792 if (val.vpos >= height)
@@ -2127,7 +2127,7 @@ display_text_line (w, start, vpos, hpos, taboffset)
2127 break; 2127 break;
2128 2128
2129 /* Did we reach point? Record the cursor location. */ 2129 /* Did we reach point? Record the cursor location. */
2130 if (pos == point && cursor_vpos < 0) 2130 if (pos == PT && cursor_vpos < 0)
2131 { 2131 {
2132 cursor_vpos = vpos; 2132 cursor_vpos = vpos;
2133 cursor_hpos = p1 - leftmargin; 2133 cursor_hpos = p1 - leftmargin;
@@ -2155,7 +2155,7 @@ display_text_line (w, start, vpos, hpos, taboffset)
2155 next_invisible = end; 2155 next_invisible = end;
2156 if (! NILP (prop)) 2156 if (! NILP (prop))
2157 { 2157 {
2158 if (pos < point && next_invisible >= point) 2158 if (pos < PT && next_invisible >= PT)
2159 { 2159 {
2160 cursor_vpos = vpos; 2160 cursor_vpos = vpos;
2161 cursor_hpos = p1 - leftmargin; 2161 cursor_hpos = p1 - leftmargin;
@@ -2188,8 +2188,8 @@ display_text_line (w, start, vpos, hpos, taboffset)
2188 2188
2189 /* Wouldn't you hate to read the next line to someone over 2189 /* Wouldn't you hate to read the next line to someone over
2190 the phone? */ 2190 the phone? */
2191 if (pos < point && point < pause) 2191 if (pos < PT && PT < pause)
2192 pause = point; 2192 pause = PT;
2193 if (pos < GPT && GPT < pause) 2193 if (pos < GPT && GPT < pause)
2194 pause = GPT; 2194 pause = GPT;
2195 2195
@@ -2410,7 +2410,7 @@ display_text_line (w, start, vpos, hpos, taboffset)
2410 /* If point is at eol or in invisible text at eol, 2410 /* If point is at eol or in invisible text at eol,
2411 record its frame location now. */ 2411 record its frame location now. */
2412 2412
2413 if (start <= point && point <= lastpos && cursor_vpos < 0) 2413 if (start <= PT && PT <= lastpos && cursor_vpos < 0)
2414 { 2414 {
2415 cursor_vpos = vpos; 2415 cursor_vpos = vpos;
2416 cursor_hpos = p1 - leftmargin; 2416 cursor_hpos = p1 - leftmargin;