[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: `c-indent-command' in a rare case]
From: |
Kim F. Storm |
Subject: |
Re: address@hidden: `c-indent-command' in a rare case] |
Date: |
Mon, 11 Oct 2004 00:38:22 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> Huh? Contrary to skip-chars-forward, forward-line returns the number of
> lines remaining, not the "decrease in the number of lines remaining".
> I.e. (zerop (forward-line 1)) is often used to check that forward-line has
> indeed moved.
>
> I agree with Martin that it would be better to not return 0 when it has
> moved
> but hasn't managed to move to a different line.
>
> Ok, I agree.
>
> Would someone like to change this?
>
> It is important to check that the various callers that look
> at the return value will still work. But I tend to think they
> mostly will, because this change would increase the consistency
> of the return value.
As David pointed out, count-lines and line-number-at-pos both depend
on the current behaviour in case the last line has no newline.
--
Kim F. Storm <address@hidden> http://www.cua.dk