/[emacs]/emacs/src/cmds.c
ViewVC logotype

Diff of /emacs/src/cmds.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.85 by pj, Tue Nov 13 07:44:06 2001 UTC revision 1.86 by rms, Mon Apr 22 22:33:36 2002 UTC
# Line 179  DEFUN ("end-of-line", Fend_of_line, Send Line 179  DEFUN ("end-of-line", Fend_of_line, Send
179         doc: /* Move point to end of current line.         doc: /* Move point to end of current line.
180  With argument N not nil or 1, move forward N - 1 lines first.  With argument N not nil or 1, move forward N - 1 lines first.
181  If point reaches the beginning or end of buffer, it stops there.  If point reaches the beginning or end of buffer, it stops there.
182    To ignore intangibility, bind `inhibit-text-motion-hooks' to t.
183    
184  This command does not move point across a field boundary unless doing so  This command does not move point across a field boundary unless doing so
185  would move beyond there to a different line; if N is nil or 1, and  would move beyond there to a different line; if N is nil or 1, and
# Line 187  boundaries bind `inhibit-field-text-moti Line 188  boundaries bind `inhibit-field-text-moti
188       (n)       (n)
189       Lisp_Object n;       Lisp_Object n;
190  {  {
191      int newpos;
192    
193    if (NILP (n))    if (NILP (n))
194      XSETFASTINT (n, 1);      XSETFASTINT (n, 1);
195    else    else
196      CHECK_NUMBER (n);      CHECK_NUMBER (n);
197    
198    SET_PT (XINT (Fline_end_position (n)));    while (1)
199        {
200          newpos = XINT (Fline_end_position (n));
201          SET_PT (newpos);
202    
203          if (PT > newpos
204              && FETCH_CHAR (PT - 1) == '\n')
205            {
206              /* If we skipped over a newline that follows
207                 an invisible intangible run,
208                 move back to the last tangible position
209                 within the line.  */
210    
211              SET_PT (PT - 1);
212              break;
213            }
214          else if (PT > newpos && PT < ZV
215                   && FETCH_CHAR (PT) != '\n')
216            /* If we skipped something intangible
217               and now we're not really at eol,
218               keep going.  */
219            n = make_number (1);
220          else
221            break;
222        }
223    
224    return Qnil;    return Qnil;
225  }  }

Legend:
Removed from v.1.85  
changed lines
  Added in v.1.86

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26