changeset 9243:c35d0ed03819

(Frecenter): Don't trigger point-motion hooks.
author Karl Heuer <kwzh@gnu.org>
date Mon, 03 Oct 1994 00:25:59 +0000
parents 493c74aab5a0
children 853d760cba83
files src/window.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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;