From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value Date: Sun, 9 Feb 2014 16:12:31 -0800 (PST) Message-ID: <1281d0fd-77cb-45e2-b99d-f4ad24b0fc4e@default> References: <1dc76f7a-5481-41df-b976-ec22229d7283@default> <874n4a42f0.fsf@building.gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1391991196 15891 80.91.229.3 (10 Feb 2014 00:13:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Feb 2014 00:13:16 +0000 (UTC) Cc: 15117@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 10 01:13:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WCeV0-00035K-En for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Feb 2014 01:13:22 +0100 Original-Received: from localhost ([::1]:52594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCeV0-00066B-0T for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Feb 2014 19:13:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCeUo-00062w-Mq for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 19:13:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCeUg-0007kb-2Z for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 19:13:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCeUf-0007kX-VB for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 19:13:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WCeUf-0002qR-Ll for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 19:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Feb 2014 00:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 15117-submit@debbugs.gnu.org id=B15117.139199115910901 (code B ref 15117); Mon, 10 Feb 2014 00:13:01 +0000 Original-Received: (at 15117) by debbugs.gnu.org; 10 Feb 2014 00:12:39 +0000 Original-Received: from localhost ([127.0.0.1]:32811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WCeUI-0002pk-SB for submit@debbugs.gnu.org; Sun, 09 Feb 2014 19:12:39 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:19932) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WCeUF-0002pN-Tw for 15117@debbugs.gnu.org; Sun, 09 Feb 2014 19:12:36 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s1A0CYCc032708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Feb 2014 00:12:35 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1A0CY6G014595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Feb 2014 00:12:34 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s1A0CXCi006291; Mon, 10 Feb 2014 00:12:33 GMT In-Reply-To: <874n4a42f0.fsf@building.gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85112 Archived-At: > > These are motion functions, just like `goto-char' and > > `skip-chars-forward'. Their doc should specify the return value > > (regardless of whether it is a position, a Boolean, always nil, or > > anything else). > > > > If, for some special (good) reason,=20 What is that special, good reason? > > code should not rely on the return value of some function then > > this fact should be stated explicitly in the doc: "This function > > is used only for its side effects; the return value is undefined." > > This is Lisp, not C - return values are the norm, > > not the exception. >=20 > No, in Emacs we seldom say that. Functions used for side effect are > quite normal. Please _read_. No one said that side-effect functions are abnormal. These are NOT side-effect functions. They modify nothing except the cursor position. These are normal, ordinary, run-of-the-mill motion functions. Their return values should be specified. We do not proscribe users from using the return value of motion functions, in general - quite the contrary. > > The doc of `(forward|backward)-(word|line)' already correctly > > specifies the return value. Not so for other > > `(forward|backward)-*' functions, such as `(forward|backward)-sexp'. >=20 > They don't seem to return anything useful. Closing. Where do you get off saying that? Of course it is useful to use the return value of a motion function. It saves a call to `point', which can simplify the code. (Yes, simple and beautiful is in the eye of the reader. But the point is that it is normal for users to make use of the return value of a motion function that is side-effect free. Reopening.