From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Date: Fri, 23 Dec 2016 21:46:39 +0900 Message-ID: <8760ma4xu8.fsf@gmail.com> References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> <83r35fg9jq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482497240 16147 195.159.176.226 (23 Dec 2016 12:47:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Dec 2016 12:47:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 25154@debbugs.gnu.org, agrambot@gmail.com, tino.calancha@gmail.com To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 23 13:47:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKPFc-0002pc-Nm for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Dec 2016 13:47:08 +0100 Original-Received: from localhost ([::1]:38886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKPFh-0002nH-CO for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Dec 2016 07:47:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKPFb-0002lw-Bt for bug-gnu-emacs@gnu.org; Fri, 23 Dec 2016 07:47:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKPFX-0006Ba-El for bug-gnu-emacs@gnu.org; Fri, 23 Dec 2016 07:47:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36716) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cKPFX-0006BU-AV for bug-gnu-emacs@gnu.org; Fri, 23 Dec 2016 07:47:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cKPFW-0005kr-6U for bug-gnu-emacs@gnu.org; Fri, 23 Dec 2016 07:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Dec 2016 12:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25154 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148249721022103 (code B ref 25154); Fri, 23 Dec 2016 12:47:02 +0000 Original-Received: (at 25154) by debbugs.gnu.org; 23 Dec 2016 12:46:50 +0000 Original-Received: from localhost ([127.0.0.1]:52115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKPFK-0005kR-DW for submit@debbugs.gnu.org; Fri, 23 Dec 2016 07:46:50 -0500 Original-Received: from mail-pg0-f65.google.com ([74.125.83.65]:34407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKPFI-0005kF-Qg for 25154@debbugs.gnu.org; Fri, 23 Dec 2016 07:46:49 -0500 Original-Received: by mail-pg0-f65.google.com with SMTP id b1so454937pgc.1 for <25154@debbugs.gnu.org>; Fri, 23 Dec 2016 04:46:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=s92h4hlQkgvDuDroxVb4LRT+hCqyF5iUQdXlmBjdJTk=; b=DFKxqcsWTmBNm7PzWFkygVb4F1P42qfWdHxQH8H/dsk7Ixq2WjqdfcKjEaQxbICW2g RCczQarDjINEX8PapRQbcEF00g9nG4wuxzIvt50lm+vwtSWKv8i3/9ZUz3MKhhKwOUuN Z9VHWZQFbnIHB/bs9fwsUSzoRge5E88PDBw+Y7CT9L+tagEE79hp/SeccztEbp1/W4uT nhM1qOY06QsxtEnO+6LaYW8h3AcvLnEEJDmhJMKZYVRzXchjjW4J9lOlnPG9iN5wLl21 tpP4a8Qd9dwTBsn6/4GsPwSRuKgPQqWf6c8j8rbcgXzBKuwWiGQLpQgsb7njIEGyGiwX LNSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=s92h4hlQkgvDuDroxVb4LRT+hCqyF5iUQdXlmBjdJTk=; b=sGWy8Be8wBOaWNkSExO/HoKTg+IFEfuYCErKKNA0q5tbiQoKIlO32m7VcF9Dv/5yOH MU8CiwiXYzXjjxvMs+MAU16uKDDUaEb9zawdK90ImVMKaI9b04fz/kaWZbSjDcedd9EF 9D8m0tQr/u4pYHZLUf8CcAr2J8mGYirmldKOL93JXJdNMQZ28vmDBita5SAhpcepbhRH nM+c9v5QpUI9JaasSjx/D3A/Qf7BkOJjuB49yFtQh20WWZOGPQxgF5q945errq6S2514 +mJq6r9qBZSZHxdGwa5y+Ih/S4pX1aUCgzlaPg9XrOwG5UsoJpJreBzLIQ5Mi6hrRkUb kxfA== X-Gm-Message-State: AIkVDXI/r+8QSSR9hA+i31uivKerMjolqZNHlggu/XoV6VVetoFOXgQ+ePPQF7rWxOxb0A== X-Received: by 10.99.24.84 with SMTP id 20mr25927736pgy.12.1482497203109; Fri, 23 Dec 2016 04:46:43 -0800 (PST) Original-Received: from calancha-pc (177.192.218.133.dy.bbexcite.jp. [133.218.192.177]) by smtp.gmail.com with ESMTPSA id l3sm62554982pgc.41.2016.12.23.04.46.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Dec 2016 04:46:42 -0800 (PST) In-Reply-To: (Philipp Stephani's message of "Fri, 23 Dec 2016 12:17:54 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:127362 Archived-At: Philipp Stephani writes: > I agree, patches to that effect are welcome. (AFAICT, the manual > tries to say that already, but the wording could be more explicit.) > > OK, I've attached a patch that hopefully clarifies this a bit. > > From 42d7450c41d69a713eb8f9492cc169e8c2bc15ca Mon Sep 17 00:00:00 2001 > From: Philipp Stephani > Date: Fri, 23 Dec 2016 13:14:55 +0100 > Subject: [PATCH] Document that variable binding order is unspecified > > * doc/lispref/variables.texi (Local Variables): > * cl.texi (Modify Macros): Document that assignment order in 'let' and > 'cl-letf' is unspecified. > --- > doc/lispref/variables.texi | 12 ++++++++++++ > doc/misc/cl.texi | 5 +++++ > 2 files changed, 17 insertions(+) > > diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi > index a2d64815d9..e2c8c542ab 100644 > --- a/doc/lispref/variables.texi > +++ b/doc/lispref/variables.texi > @@ -221,6 +221,18 @@ Local Variables > @result{} (1 2) > @end group > @end example > + > +On the other hand, the order of @emph{assignments} is unspecified: in > +the following example, either 1 or 2 might be printed. > + > +@example > +(let ((x 1) > + (x 2)) > + (print x)) > +@end example > + > +Therefore, avoid binding a variable more than once in a single > +@code{let} form. > @end defspec > > @defspec let* (bindings@dots{}) forms@dots{} > diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi > index c62fa727c1..aa047e2122 100644 > --- a/doc/misc/cl.texi > +++ b/doc/misc/cl.texi > @@ -1179,6 +1179,11 @@ Modify Macros > as @code{setf} places; each will accept either an integer or a > marker as the stored value.) > > +Like in the case of @code{let}, the @var{value} forms are evaluated in > +the order they appear, but the order of assignments is unspecified. > +Therefore, avoid assigning to the same @var{place} more than once in a > +single @code{cl-letf} form. > + > Since generalized variables look like lists, @code{let}'s shorthand > of using @samp{foo} for @samp{(foo nil)} as a @var{binding} would > be ambiguous in @code{cl-letf} and is not allowed. It looks good to me. Thank you. Tino