Mercurial > emacs
comparison src/window.c @ 7347:3a677a303d5b
Use PT, not point.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 06 May 1994 01:00:15 +0000 |
parents | 4751ee5f263e |
children | 99b9c9068761 |
comparison
equal
deleted
inserted
replaced
7346:777404b1718d | 7347:3a677a303d5b |
---|---|
195 register struct buffer *buf; | 195 register struct buffer *buf; |
196 struct position posval; | 196 struct position posval; |
197 int hscroll; | 197 int hscroll; |
198 | 198 |
199 if (NILP (pos)) | 199 if (NILP (pos)) |
200 posint = point; | 200 posint = PT; |
201 else | 201 else |
202 { | 202 { |
203 CHECK_NUMBER_COERCE_MARKER (pos, 0); | 203 CHECK_NUMBER_COERCE_MARKER (pos, 0); |
204 posint = XINT (pos); | 204 posint = XINT (pos); |
205 } | 205 } |
1359 top = XFASTINT (w->top); | 1359 top = XFASTINT (w->top); |
1360 | 1360 |
1361 window_loop (DELETE_OTHER_WINDOWS, window, 0, WINDOW_FRAME (w)); | 1361 window_loop (DELETE_OTHER_WINDOWS, window, 0, WINDOW_FRAME (w)); |
1362 | 1362 |
1363 Fset_buffer (w->buffer); | 1363 Fset_buffer (w->buffer); |
1364 opoint = point; | 1364 opoint = PT; |
1365 SET_PT (marker_position (w->start)); | 1365 SET_PT (marker_position (w->start)); |
1366 /* Like Frecenter but avoid setting w->force_start. */ | 1366 /* Like Frecenter but avoid setting w->force_start. */ |
1367 Fvertical_motion (make_number (- (top - FRAME_MENU_BAR_LINES (XFRAME (WINDOW_FRAME (w))))), | 1367 Fvertical_motion (make_number (- (top - FRAME_MENU_BAR_LINES (XFRAME (WINDOW_FRAME (w))))), |
1368 window); | 1368 window); |
1369 Fset_marker (w->start, make_number (PT), w->buffer); | 1369 Fset_marker (w->start, make_number (PT), w->buffer); |
2194 Lisp_Object window; | 2194 Lisp_Object window; |
2195 int n; | 2195 int n; |
2196 int noerror; | 2196 int noerror; |
2197 { | 2197 { |
2198 register struct window *w = XWINDOW (window); | 2198 register struct window *w = XWINDOW (window); |
2199 register int opoint = point; | 2199 register int opoint = PT; |
2200 register int pos; | 2200 register int pos; |
2201 register int ht = window_internal_height (w); | 2201 register int ht = window_internal_height (w); |
2202 register Lisp_Object tem; | 2202 register Lisp_Object tem; |
2203 int lose; | 2203 int lose; |
2204 Lisp_Object bolp, nmoved; | 2204 Lisp_Object bolp, nmoved; |
2205 | 2205 |
2206 XFASTINT (tem) = point; | 2206 XFASTINT (tem) = PT; |
2207 tem = Fpos_visible_in_window_p (tem, window); | 2207 tem = Fpos_visible_in_window_p (tem, window); |
2208 | 2208 |
2209 if (NILP (tem)) | 2209 if (NILP (tem)) |
2210 { | 2210 { |
2211 Fvertical_motion (make_number (- (ht / 2)), window); | 2211 Fvertical_motion (make_number (- (ht / 2)), window); |
2212 XFASTINT (tem) = point; | 2212 XFASTINT (tem) = PT; |
2213 Fset_marker (w->start, tem, w->buffer); | 2213 Fset_marker (w->start, tem, w->buffer); |
2214 w->force_start = Qt; | 2214 w->force_start = Qt; |
2215 } | 2215 } |
2216 | 2216 |
2217 SET_PT (marker_position (w->start)); | 2217 SET_PT (marker_position (w->start)); |
2218 lose = n < 0 && point == BEGV; | 2218 lose = n < 0 && PT == BEGV; |
2219 Fvertical_motion (make_number (n), window); | 2219 Fvertical_motion (make_number (n), window); |
2220 pos = point; | 2220 pos = PT; |
2221 bolp = Fbolp (); | 2221 bolp = Fbolp (); |
2222 SET_PT (opoint); | 2222 SET_PT (opoint); |
2223 | 2223 |
2224 if (lose) | 2224 if (lose) |
2225 { | 2225 { |
2239 SET_PT (pos); | 2239 SET_PT (pos); |
2240 if (n < 0) | 2240 if (n < 0) |
2241 { | 2241 { |
2242 SET_PT (pos); | 2242 SET_PT (pos); |
2243 tem = Fvertical_motion (make_number (ht), window); | 2243 tem = Fvertical_motion (make_number (ht), window); |
2244 if (point > opoint || XFASTINT (tem) < ht) | 2244 if (PT > opoint || XFASTINT (tem) < ht) |
2245 SET_PT (opoint); | 2245 SET_PT (opoint); |
2246 else | 2246 else |
2247 Fvertical_motion (make_number (-1), window); | 2247 Fvertical_motion (make_number (-1), window); |
2248 } | 2248 } |
2249 } | 2249 } |
2382 n = Fcar (n); | 2382 n = Fcar (n); |
2383 CHECK_NUMBER (n, 0); | 2383 CHECK_NUMBER (n, 0); |
2384 window_scroll (window, XINT (n), 1); | 2384 window_scroll (window, XINT (n), 1); |
2385 } | 2385 } |
2386 | 2386 |
2387 Fset_marker (w->pointm, make_number (point), Qnil); | 2387 Fset_marker (w->pointm, make_number (PT), Qnil); |
2388 unbind_to (count, Qnil); | 2388 unbind_to (count, Qnil); |
2389 | 2389 |
2390 return Qnil; | 2390 return Qnil; |
2391 } | 2391 } |
2392 | 2392 |
2434 (n) | 2434 (n) |
2435 register Lisp_Object n; | 2435 register Lisp_Object n; |
2436 { | 2436 { |
2437 register struct window *w = XWINDOW (selected_window); | 2437 register struct window *w = XWINDOW (selected_window); |
2438 register int ht = window_internal_height (w); | 2438 register int ht = window_internal_height (w); |
2439 register int opoint = point; | 2439 register int opoint = PT; |
2440 Lisp_Object window; | 2440 Lisp_Object window; |
2441 | 2441 |
2442 if (NILP (n)) | 2442 if (NILP (n)) |
2443 { | 2443 { |
2444 extern int frame_garbaged; | 2444 extern int frame_garbaged; |
2461 | 2461 |
2462 XSETINT (n, - XINT (n)); | 2462 XSETINT (n, - XINT (n)); |
2463 | 2463 |
2464 XSET (window, Lisp_Window, w); | 2464 XSET (window, Lisp_Window, w); |
2465 Fvertical_motion (n, window); | 2465 Fvertical_motion (n, window); |
2466 Fset_marker (w->start, make_number (point), w->buffer); | 2466 Fset_marker (w->start, make_number (PT), w->buffer); |
2467 w->start_at_line_beg = Fbolp (); | 2467 w->start_at_line_beg = Fbolp (); |
2468 | 2468 |
2469 SET_PT (opoint); | 2469 SET_PT (opoint); |
2470 w->force_start = Qt; | 2470 w->force_start = Qt; |
2471 | 2471 |
2498 start = marker_position (w->start); | 2498 start = marker_position (w->start); |
2499 XSET (window, Lisp_Window, w); | 2499 XSET (window, Lisp_Window, w); |
2500 if (start < BEGV || start > ZV) | 2500 if (start < BEGV || start > ZV) |
2501 { | 2501 { |
2502 Fvertical_motion (make_number (- (height / 2)), window); | 2502 Fvertical_motion (make_number (- (height / 2)), window); |
2503 Fset_marker (w->start, make_number (point), w->buffer); | 2503 Fset_marker (w->start, make_number (PT), w->buffer); |
2504 w->start_at_line_beg = Fbolp (); | 2504 w->start_at_line_beg = Fbolp (); |
2505 w->force_start = Qt; | 2505 w->force_start = Qt; |
2506 } | 2506 } |
2507 else | 2507 else |
2508 SET_PT (start); | 2508 SET_PT (start); |