From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [pogonyshev@gmx.net: `c-indent-command' in a rare case] Date: Mon, 11 Oct 2004 00:38:22 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <5bvfdmzscy.fsf@lister.roxen.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097447978 798 80.91.229.6 (10 Oct 2004 22:39:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 10 Oct 2004 22:39:38 +0000 (UTC) Cc: bug-cc-mode@gnu.org, pogonyshev@gmx.net, Stefan , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 11 00:39:29 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CGmLh-0004ZA-00 for ; Mon, 11 Oct 2004 00:39:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CGmSb-000774-Ee for ged-emacs-devel@m.gmane.org; Sun, 10 Oct 2004 18:46:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CGmRf-0006RK-ET for emacs-devel@gnu.org; Sun, 10 Oct 2004 18:45:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CGmRe-0006Qz-LA for emacs-devel@gnu.org; Sun, 10 Oct 2004 18:45:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CGmRe-0006Qr-Gy for emacs-devel@gnu.org; Sun, 10 Oct 2004 18:45:38 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CGmKU-0001Su-44; Sun, 10 Oct 2004 18:38:14 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 57D5447FE19; Mon, 11 Oct 2004 00:38:12 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun, 10 Oct 2004 11:16:22 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28199 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28199 Richard Stallman 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 http://www.cua.dk