emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/window.c


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/src/window.c
Date: Wed, 29 Jun 2005 19:29:02 -0400

Index: emacs/src/window.c
diff -c emacs/src/window.c:1.505 emacs/src/window.c:1.506
*** emacs/src/window.c:1.505    Tue Jun 21 11:29:47 2005
--- emacs/src/window.c  Wed Jun 29 23:29:01 2005
***************
*** 4783,4789 ****
        /* We moved the window start towards ZV, so PT may be now
         in the scroll margin at the top.  */
        move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
!       if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin)
        /* We found PT at a legitimate height.  Leave it alone.  */
        ;
        else if (preserve_y >= 0)
--- 4783,4791 ----
        /* We moved the window start towards ZV, so PT may be now
         in the scroll margin at the top.  */
        move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
!       if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin
!           && (NILP (Vscroll_preserve_screen_position)
!             || EQ (Vscroll_preserve_screen_position, Qt)))
        /* We found PT at a legitimate height.  Leave it alone.  */
        ;
        else if (preserve_y >= 0)
***************
*** 4836,4842 ****
          partial_p = it.current_y > it.last_visible_y;
        }
  
!       if (charpos == PT && !partial_p)
        /* We found PT before we found the display margin, so PT is ok.  */
        ;
        else if (preserve_y >= 0)
--- 4838,4846 ----
          partial_p = it.current_y > it.last_visible_y;
        }
  
!       if (charpos == PT && !partial_p
!           && (NILP (Vscroll_preserve_screen_position)
!             || EQ (Vscroll_preserve_screen_position, Qt)))
        /* We found PT before we found the display margin, so PT is ok.  */
        ;
        else if (preserve_y >= 0)
***************
*** 4951,4957 ****
         the window-scroll-functions.  */
        w->force_start = Qt;
  
!       if (whole && !NILP (Vscroll_preserve_screen_position))
        {
          SET_PT_BOTH (pos, pos_byte);
          Fvertical_motion (make_number (original_vpos), window);
--- 4955,4962 ----
         the window-scroll-functions.  */
        w->force_start = Qt;
  
!       if (!NILP (Vscroll_preserve_screen_position)
!         && (whole || !EQ (Vscroll_preserve_screen_position, Qt)))
        {
          SET_PT_BOTH (pos, pos_byte);
          Fvertical_motion (make_number (original_vpos), window);
***************
*** 6914,6922 ****
  
    DEFVAR_LISP ("scroll-preserve-screen-position",
               &Vscroll_preserve_screen_position,
!              doc: /* *Non-nil means scroll commands move point to keep its 
screen line unchanged.
! This is only when it is impossible to keep point fixed and still
! scroll as specified.  */);
    Vscroll_preserve_screen_position = Qnil;
  
    DEFVAR_LISP ("window-configuration-change-hook",
--- 6919,6931 ----
  
    DEFVAR_LISP ("scroll-preserve-screen-position",
               &Vscroll_preserve_screen_position,
!              doc: /* *Controls if scroll commands move point to keep its 
screen line unchanged.
! A value of nil means point does not keep its screen position except
! at the scroll margin or window boundary respectively.
! A value of t means point keeps its screen position if the scroll
! command moved it vertically out of the window, e.g. when scrolling
! by full screens.
! Any other value means point always keeps its screen position.  */);
    Vscroll_preserve_screen_position = Qnil;
  
    DEFVAR_LISP ("window-configuration-change-hook",




reply via email to

[Prev in Thread] Current Thread [Next in Thread]