help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: move-end-of-line vs just search for newline char?


From: Uday S Reddy
Subject: Re: move-end-of-line vs just search for newline char?
Date: Tue, 04 May 2010 15:42:02 -0000
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Xah Lee wrote:
> There's the move-end-of-line function. The source code and doc seems a
> bit complicated.
> 
> my question is, what's the difference if i just call
> 
>   (search-forward "\n")
>   (backward-char 1)

I think (end-of-line 1) is the preferred way of going to the end of line.

move-end-of-line is an interactive command and it has to take care of various 
stuff.   Your alternative might not work in a CRLF line-ending format or if 
there is no newline at the end of the buffer.

Cheers,
Uday
 


reply via email to

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