# HG changeset patch # User Karl Heuer # Date 781143959 0 # Node ID c35d0ed03819f893e3256b738d38956014997b32 # Parent 493c74aab5a0d2e09070ed073b119e868f243687 (Frecenter): Don't trigger point-motion hooks. diff -r 493c74aab5a0 -r c35d0ed03819 src/window.c --- a/src/window.c Sun Oct 02 23:57:56 1994 +0000 +++ b/src/window.c Mon Oct 03 00:25:59 1994 +0000 @@ -2629,7 +2629,7 @@ { register struct window *w = XWINDOW (selected_window); register int ht = window_internal_height (w); - register int opoint = PT; + struct position pos; Lisp_Object window; if (NILP (n)) @@ -2652,14 +2652,14 @@ if (XINT (n) < 0) XSETINT (n, XINT (n) + ht); - XSETINT (n, - XINT (n)); - XSET (window, Lisp_Window, w); - Fvertical_motion (n, window); - Fset_marker (w->start, make_number (PT), w->buffer); - w->start_at_line_beg = Fbolp (); - - SET_PT (opoint); + pos = *vmotion (point, - XINT (n), window_internal_width (w) - 1, + XINT (w->hscroll), window); + + Fset_marker (w->start, make_number (pos.bufpos), w->buffer); + w->start_at_line_beg = ((pos.bufpos == BEGV + || FETCH_CHAR (pos.bufpos - 1) == '\n') + ? Qt : Qnil); w->force_start = Qt; return Qnil;