]> git.eshelyaron.com Git - emacs.git/commitdiff
(init_buffer_once, syms_of_buffer):
authorRichard M. Stallman <rms@gnu.org>
Fri, 27 Jan 1995 07:17:39 +0000 (07:17 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 27 Jan 1995 07:17:39 +0000 (07:17 +0000)
Set up buffer-local var point_before_scroll.
(reset_buffer): Init point_before_scroll.

src/buffer.c

index c8c5498c083804fa64650ea96eedea98df285e2d..052413ba64fcfc3704fe9ac30aa40af7c4910441 100644 (file)
@@ -423,6 +423,7 @@ reset_buffer (b)
   b->overlays_after = Qnil;
   XSETFASTINT (b->overlay_center, 1);
   b->mark_active = Qnil;
+  b->point_before_scroll = Qnil;
 }
 
 /* Reset buffer B's local variables info.
@@ -2714,6 +2715,7 @@ init_buffer_once ()
   XSETINT (buffer_local_flags.mode_name, -1);
   XSETINT (buffer_local_flags.undo_list, -1);
   XSETINT (buffer_local_flags.mark_active, -1);
+  XSETINT (buffer_local_flags.point_before_scroll, -1);
 
   XSETFASTINT (buffer_local_flags.mode_line_format, 1);
   XSETFASTINT (buffer_local_flags.abbrev_mode, 2);
@@ -3223,6 +3225,9 @@ maintained internally by the Emacs primitives.  Enabling or disabling\n\
 the cache should not affect the behavior of any of the motion\n\
 functions; it should only affect their performance.");
 
+  DEFVAR_PER_BUFFER ("point-before-scroll", &current_buffer->point_before_scroll, Qnil,
+  "Value of point before the last series of scroll operations, or nil.");
+
   DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode,
     "*Non-nil means deactivate the mark when the buffer contents change.");
   Vtransient_mark_mode = Qnil;