emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/cmds.c
Date: Mon, 22 Apr 2002 18:33:36 -0400

Index: emacs/src/cmds.c
diff -c emacs/src/cmds.c:1.85 emacs/src/cmds.c:1.86
*** emacs/src/cmds.c:1.85       Tue Nov 13 02:44:06 2001
--- emacs/src/cmds.c    Mon Apr 22 18:33:36 2002
***************
*** 179,184 ****
--- 179,185 ----
         doc: /* Move point to end of current line.
  With argument N not nil or 1, move forward N - 1 lines first.
  If point reaches the beginning or end of buffer, it stops there.
+ To ignore intangibility, bind `inhibit-text-motion-hooks' to t.
  
  This command does not move point across a field boundary unless doing so
  would move beyond there to a different line; if N is nil or 1, and
***************
*** 187,198 ****
       (n)
       Lisp_Object n;
  {
    if (NILP (n))
      XSETFASTINT (n, 1);
    else
      CHECK_NUMBER (n);
  
!   SET_PT (XINT (Fline_end_position (n)));
  
    return Qnil;
  }
--- 188,225 ----
       (n)
       Lisp_Object n;
  {
+   int newpos;
+ 
    if (NILP (n))
      XSETFASTINT (n, 1);
    else
      CHECK_NUMBER (n);
  
!   while (1)
!     {
!       newpos = XINT (Fline_end_position (n));
!       SET_PT (newpos);
! 
!       if (PT > newpos
!         && FETCH_CHAR (PT - 1) == '\n')
!       {
!         /* If we skipped over a newline that follows
!            an invisible intangible run,
!            move back to the last tangible position
!            within the line.  */
! 
!         SET_PT (PT - 1);
!         break;
!       }
!       else if (PT > newpos && PT < ZV
!              && FETCH_CHAR (PT) != '\n')
!       /* If we skipped something intangible
!          and now we're not really at eol,
!          keep going.  */
!       n = make_number (1);
!       else
!       break;
!     }
  
    return Qnil;
  }



reply via email to

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