From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2016 23:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25154 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25154@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.148132767414954 (code B ref -1); Fri, 09 Dec 2016 23:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Dec 2016 23:54:34 +0000 Received: from localhost ([127.0.0.1]:36395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFUzq-0003t8-1R for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:54:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFUzo-0003sj-9u for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:54:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFUjg-0008Ge-T5 for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:37:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFUjg-0008GZ-QD for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:37:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFUjf-0008Us-Hr for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 18:37:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFUja-0008FX-N6 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 18:37:51 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:36378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cFUja-0008DZ-I7 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 18:37:46 -0500 Received: by mail-io0-f193.google.com with SMTP id b194so9912773ioa.3 for ; Fri, 09 Dec 2016 15:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=8KYFlRK8FUk/6cgY/d/gbC1A0ZgNJSQ/pNwBZ0TDrhs=; b=QvAiopiRz9YhKDlgDUnax3E1qSWIxMsMx97kHZ1zrggLp9lMdMxSW/3U3lQdUj7nt+ exveNgYsdXODyEr93mOYoA6B5f+py8qm6H3BEnxDpSpk4DC0vjTgbFSY+T1/k5NPvXQr mGTl1FiMIjVYl2Mv6EZCq84wiEW6+a9ZpL86N37sBweOWqzDf+caTIkLKZ0Vwgrh0Wxt flPkupOnHPBdLoSe+7mfPVAw/6iXQlZi50dp+DOl5BICKtXezHXpyeVEIz1LuCqKqb/e U7bq3+Eo3zhtp/xXftwp5JJaZ/kqNfBVcHBbqKPb1LJsI+nzRUFcuXLdZWMq72SDFHah Ui4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=8KYFlRK8FUk/6cgY/d/gbC1A0ZgNJSQ/pNwBZ0TDrhs=; b=kXSRi4k8rtAEFb/N8G6Gepxq93MHCYvvcKc82X5f7j0ip+phROYdsO302fJhL6mu4d RvDa+g7GoQQ8cim5EwwmKAk8NRD/A+IW4l4KCmZ0QMzPKXSKiZFUVL+k4BHm5mLR1OcN AAqfSgd9cm7iwQq6RQ75TrjAbNCDmC/jC+MvSis5IDo1uoq4/8aALCHk0vLPRjcQVLP8 vu86STVKnmUBELYuP534xNStI+CzqEpxoatcORgAGr+YYdjFsa556v94dOJh6ibnO+Ls 0/h5sbCwAWoNyKFLenpWkFt5t0V8nbPTVKDN9SAf0Vs3rtnt5oCfieHIu5AKquDEq+KH pudg== X-Gm-Message-State: AKaTC00aQiePP3zjKvLVquysaJEzU9uZXfcT5k+O9ffPSFrMbqSSSSqg6zu4OuQolKaXMQ== X-Received: by 10.36.53.69 with SMTP id k66mr9052491ita.18.1481326584288; Fri, 09 Dec 2016 15:36:24 -0800 (PST) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id 2sm15511557ioz.30.2016.12.09.15.36.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Dec 2016 15:36:23 -0800 (PST) From: Alex Date: Fri, 09 Dec 2016 17:36:15 -0600 Message-ID: <8737hwllow.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Compare the following: (let ((x 5) (x 6)) (+ x 10)) => 16 (cl-letf ((x 5) (x 6)) (+ x 10)) => 15 This also occurs when using non-trivial places: (setq v (vector 1 2 3 4 5)) (cl-letf (((aref v 1) 10) ((aref v 1) 20)) (aref v 1)) => 10 I ran into this when using two different setters that sometimes indirectly modify the same variable. The current behaviour makes the result of that unexpected. From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 04:30: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: To: 25154@debbugs.gnu.org Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.14813441956422 (code B ref 25154); Sat, 10 Dec 2016 04:30:02 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 04:29:55 +0000 Received: from localhost ([127.0.0.1]:36467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFZII-0001fW-Ud for submit@debbugs.gnu.org; Fri, 09 Dec 2016 23:29:55 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:34485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFZIH-0001fI-DQ for 25154@debbugs.gnu.org; Fri, 09 Dec 2016 23:29:53 -0500 Received: by mail-io0-f194.google.com with SMTP id y124so10829731iof.1 for <25154@debbugs.gnu.org>; Fri, 09 Dec 2016 20:29:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=QowZr5mFSDrHgW42kTamb5W+yDP+nkL2nwv6oqFK0ao=; b=tQgQyUQciIvuo0bbfPDL5XqKy0YiLM30MnFNMDzFo8KRiV+kSbPoRj/vx0Sa6tpyAw FdK/yjBwRCMuVhw1Db9g6gKzeCsWmVSkDeyG609+mCTkNP0RszJPttpdgRyYr2mAeR0I RDd90NHFKro9UPE0rYYNr3+Iq2WI1SZkdF8KQjiqVqj9F38XAl1cncVBQkNGeWrruxxe RBBIMLaTcSEGR9MG0dj0/ZuDOCPK8L2TKr/Pq8k1+dIUcvxxAFm4Li03555ACzPERLWV VTQpjxlw/XU4ntJ0eeat7SYuvE2QkEw2yKxP05BwzFCttXoBJSVVQhiVVAmLAGaeD+6m lhwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=QowZr5mFSDrHgW42kTamb5W+yDP+nkL2nwv6oqFK0ao=; b=AHCYgs8yD1N4xCofX8Ia3yVmPCqwrnQiV96BxbXkmw8mvVq+JB7mwAKLzJxVqd9lrf fxfryTCOuX8uwCe2Jj8y/IUkGZ3UXVnbuf4V29anxpbFKJFTpyIqWFSn1NcesaoafQXX 3/E1oLQoCpZDmqHPAv4lO6UePSR9Z0IEaUUSUV4hWfuvsXZdc262+h8z4qnqevY+DSI0 2cS4fXETaC2mzLEnXYFWINmmqsq4MgQ4ulga5zEm7N0YFXm5206wDs4WHeyKRVfO01u3 8L4RgBPbJB28glk4qcQUhHlcJlaac7G6QfA/FCH9Ra4PH6shv4jXxoN4/rnRqEYIpjJ5 AAEA== X-Gm-Message-State: AKaTC00H1KmdHd/6q3nqJyS0pJEMm6UOcDOrVE5EXp9hdYyJkpeS+sGxtNKOJsPN5x38qw== X-Received: by 10.36.64.75 with SMTP id n72mr1518739ita.105.1481344187567; Fri, 09 Dec 2016 20:29:47 -0800 (PST) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id r207sm8294372iod.4.2016.12.09.20.29.46 for <25154@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Dec 2016 20:29:46 -0800 (PST) From: Alex References: <8737hwllow.fsf@gmail.com> Date: Fri, 09 Dec 2016 22:29:36 -0600 In-Reply-To: <8737hwllow.fsf@gmail.com> (Alex's message of "Fri, 09 Dec 2016 17:36:15 -0600") Message-ID: <87shpwbe4v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Alex writes: > Compare the following: > > (let ((x 5) > (x 6)) > (+ x 10)) > > => 16 > > (cl-letf ((x 5) > (x 6)) > (+ x 10)) > > => 15 > > > This also occurs when using non-trivial places: > > (setq v (vector 1 2 3 4 5)) > > (cl-letf (((aref v 1) 10) > ((aref v 1) 20)) > (aref v 1)) > > => 10 > > > I ran into this when using two different setters that sometimes > indirectly modify the same variable. The current behaviour makes the > result of that unexpected. I attached a patch that fixes this issue: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Preserve-the-order-of-bindings-in-cl-letf.patch Content-Description: cl-letf patch >From 9a74f1e7f8d8cc77b111473f8ee53e46af8a9957 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Fri, 9 Dec 2016 22:10:54 -0600 Subject: [PATCH] Preserve the order of bindings in cl--letf Do not reverse the order of the bindings in cl-letf (Bug #25154). * lisp/emacs-lisp/cl-macs.el (cl--letf): Use nreverse to restore the order of bindings. --- lisp/emacs-lisp/cl-macs.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 210a208..34f124f 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2388,7 +2388,10 @@ cl--letf ;; VAL1; VAL2; PLACE1; bind1; PLACE2; bind2 ;; Common-Lisp's `psetf' does the first, so we'll do the same. (if (null bindings) - (if (and (null binds) (null simplebinds)) (macroexp-progn body) + (if (and (null binds) (null simplebinds)) + (macroexp-progn body) + (setq binds (nreverse binds)) + (setq simplebinds (nreverse simplebinds)) `(let* (,@(mapcar (lambda (x) (pcase-let ((`(,vold ,getter ,_setter ,_vnew) x)) (list vold getter))) -- 2.10.2 --=-=-=-- From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 07:22: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: To: Alex Cc: 25154@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148135451328762 (code B ref 25154); Sat, 10 Dec 2016 07:22:02 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 07:21:53 +0000 Received: from localhost ([127.0.0.1]:36496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFbyj-0007Tq-Ds for submit@debbugs.gnu.org; Sat, 10 Dec 2016 02:21:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFbyi-0007Tf-Qu for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 02:21:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFbya-0008T4-Lh for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 02:21:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFbya-0008Sz-IU; Sat, 10 Dec 2016 02:21:44 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4961 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cFbyZ-0001t4-N5; Sat, 10 Dec 2016 02:21:44 -0500 Date: Sat, 10 Dec 2016 09:22:15 +0200 Message-Id: <83zik4fdug.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <8737hwllow.fsf@gmail.com> (message from Alex on Fri, 09 Dec 2016 17:36:15 -0600) References: <8737hwllow.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.0 (--------) > From: Alex > Date: Fri, 09 Dec 2016 17:36:15 -0600 > > Compare the following: > > (let ((x 5) > (x 6)) > (+ x 10)) > > => 16 > > (cl-letf ((x 5) > (x 6)) > (+ x 10)) > > => 15 Isn't it true that the order of evaluation in a 'let' is unspecified? If you want a particular order, use 'let*'. From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 07:44: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: To: Eli Zaretskii Cc: 25154@debbugs.gnu.org, Alex , tino.calancha@gmail.com Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.14813557955121 (code B ref 25154); Sat, 10 Dec 2016 07:44:02 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 07:43:15 +0000 Received: from localhost ([127.0.0.1]:36510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFcJP-0001KW-ED for submit@debbugs.gnu.org; Sat, 10 Dec 2016 02:43:15 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFcJO-0001KJ-9Y for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 02:43:14 -0500 Received: by mail-pf0-f193.google.com with SMTP id i88so2181163pfk.2 for <25154@debbugs.gnu.org>; Fri, 09 Dec 2016 23:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=oiHIDHauGm4XSV5hq9jKjIUQ2IPAOBk6KZU0p34icVM=; b=iO59ZefZQSD/DjQVYa8Yr9q7E7wunPki3E46VC4f9HrCuBCSQ0Rp+WaDofKkZFFrtP 2DmsB+6SzC/SPVVp6eG/h7ncw/RVaUEyzIpSGDGGLqIRD+0nR0bXU3ECWvXoB30kHZKN UYi4F4gA0vn8Gpbtvjnj+aCIGlZ4kZqEYA9FVcsv73TXxaxL/5ayK1b7t5JuARmqw1V2 6+R4vTIRNUNLu1BFCqLlZm/L5J5f1SOq/6NDw9YKPrC6KXh+hI6q9+wE/+54fq+lJ1p1 BBYjLFNODqnj0gm3FBZLXxMUcx5nGnHtmzSVKuOBzoZCHSJkwH7KCyZcaP1moW4XDAn4 ygeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=oiHIDHauGm4XSV5hq9jKjIUQ2IPAOBk6KZU0p34icVM=; b=U704+lVQcroluT9d/Qld6so4PKoSDFLQNectbUTZeJCbi+iJwl/1YQ9z38JNMvLYUq kWzaQyTSIxDFRRg0pDJlxlroRfp0niarDS/pe915NvPBZ9z/HugDUJ1CogDzt/uBs617 e08dukfBcEDj/cUsNcZDX77bpWUXMNNTYAJlhJE15Uxr4WYdp+DnLD5ZYrlQ7a3IXrPg gQFA1gvhqw83rEEilpYKYbQ4K14nfqdBfkBg3vOI1XlS4qqF6MlBCDGM9jQ66yhwwMBh DKZlmNAbdUF2/sFdT2MAn9HGb+hrWMe9qn8XxNpKABTGKmaFScwO5GIoxoYAIdLvD75w 4q+g== X-Gm-Message-State: AKaTC03tdSXxY2Sn18iSQLtcxNnZHpvZ0bny9XuPIDBCyDUvqPdWMlX53bjWOyJYFKhmQw== X-Received: by 10.84.142.1 with SMTP id 1mr162279051plw.87.1481355788238; Fri, 09 Dec 2016 23:43:08 -0800 (PST) Received: from calancha-pc (177.192.218.133.dy.bbexcite.jp. [133.218.192.177]) by smtp.gmail.com with ESMTPSA id y20sm62321771pfj.26.2016.12.09.23.43.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Dec 2016 23:43:07 -0800 (PST) From: Tino Calancha References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> Date: Sat, 10 Dec 2016 16:43:02 +0900 In-Reply-To: <83zik4fdug.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Dec 2016 09:22:15 +0200") Message-ID: <8760msmdq1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: >> From: Alex >> Date: Fri, 09 Dec 2016 17:36:15 -0600 >> >> Compare the following: >> >> (let ((x 5) >> (x 6)) >> (+ x 10)) >> >> => 16 >> >> (cl-letf ((x 5) >> (x 6)) >> (+ x 10)) >> >> => 15 > > Isn't it true that the order of evaluation in a 'let' is unspecified? > If you want a particular order, use 'let*'. Right, the order of evaluation in a let is up to the implementation. A program should not rely on such details. The same statement should apply to cl-letf. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 10 02:43:36 2016 Received: (at control) by debbugs.gnu.org; 10 Dec 2016 07:43:36 +0000 Received: from localhost ([127.0.0.1]:36513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFcJk-0001L8-LI for submit@debbugs.gnu.org; Sat, 10 Dec 2016 02:43:36 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFcJi-0001Kt-Le for control@debbugs.gnu.org; Sat, 10 Dec 2016 02:43:34 -0500 Received: by mail-pg0-f68.google.com with SMTP id e9so4666754pgc.1 for ; Fri, 09 Dec 2016 23:43:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:to:from:subject; bh=QSomcoXbEqfW6KJSsu/LwxD/etwS7IsqZG5hvAYWKzQ=; b=wxoTS5Sg9BCLxhFmJhalbIt36xyunJLnNZrgjcBl8a+h0fqbUPvCoRCegvZVDDW9gb ZkArriYmLsgzs1J8VCDlO2pFv/dGkZn0z4QviTCdg+0WNKr121wh790AZDBoaA/s5SEb tfU+AjRaOjb7qK5zSL5SOD4vjd9ytCgdWwsRSIVWJHUJE4c0tZdcJT6uwqMrJRnW06AN t1NHu1+ZivLJoGZTWp99+urHwJreesq9ACUHDtAArbOODjL20qSzbxC4FsaUNDhabxW6 iQPwoY1X7tpJao4CfYy9e/8wv0mjlhQdIbkGUXIkv+IlZfneW8jZMVM5Skc5zLHRMuQt QOuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:message-id:to:from:subject; bh=QSomcoXbEqfW6KJSsu/LwxD/etwS7IsqZG5hvAYWKzQ=; b=e3mJyBAld+NhFoN3seYL7+WSh6LorkVCNlowZzgyXmyfXwcKUHmxacHVqEuEIwZDFJ 8FXA0atr/cQ6l4SJuDboNs4nv3jcNh4qz48LSltaQMN0dcMzP9OVexb0okLOOuEAY6l2 tZ1l1r3qSiT/11a/qo7jnPLx35JDJ3eWev4UgrmTiHlq01zxQZNor2owcp+qmFvCd/8t avybd8IWZE4Y+pQAPN21BdAbLgdFRD4getB9gUl8Z8etjPOmtsDSqBipsZ2pPyEh/uMn F4INcWKBWqE1POWmeFVywEIC644aogh8KA5Wr1BJliRK2htRP7lM/Mbrgj3Y02L5MQL8 eApw== X-Gm-Message-State: AKaTC00EebP4m1bS9/agTUI0QMxoamzsD2Q6t4SFLitWF7mDQMVUNbksmIm1gofBrtS2xg== X-Received: by 10.84.143.68 with SMTP id 62mr118071354ply.63.1481355808507; Fri, 09 Dec 2016 23:43:28 -0800 (PST) Received: from calancha-pc (177.192.218.133.dy.bbexcite.jp. [133.218.192.177]) by smtp.gmail.com with ESMTPSA id o68sm62200327pfb.42.2016.12.09.23.43.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Dec 2016 23:43:28 -0800 (PST) Date: Sat, 10 Dec 2016 16:43:25 +0900 Message-Id: <874m2cmdpe.fsf@gmail.com> To: control@debbugs.gnu.org From: Tino Calancha Subject: control message for bug #25154 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) tags 25154 notabug From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 13:42:01 +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 To: Tino Calancha , Eli Zaretskii Cc: 25154@debbugs.gnu.org, Alex Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148137729419144 (code B ref 25154); Sat, 10 Dec 2016 13:42:01 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 13:41:34 +0000 Received: from localhost ([127.0.0.1]:36625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFhuA-0004yi-C6 for submit@debbugs.gnu.org; Sat, 10 Dec 2016 08:41:34 -0500 Received: from mail-wj0-f173.google.com ([209.85.210.173]:36758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFhu8-0004yS-D8 for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 08:41:33 -0500 Received: by mail-wj0-f173.google.com with SMTP id tk12so36049572wjb.3 for <25154@debbugs.gnu.org>; Sat, 10 Dec 2016 05:41:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NshyEaDwfAFUbQgz9v/7PAZv2D6YFfD4mJuzrspfMok=; b=MfzU6NVmsUAg4Y0SFJqs9H0JhPCw8kRl0AvOxl3Tiz7nwbmgdwJcMzLHTzKP/zqiUu aiaF/8Sguhvt54rijL1qxN0wU2aDvSUDtqDYk0iasuvHfK3pRBL8JHtK+o5uLh30l0+0 DBn5gQKDe7/BbpV+tJJ9kj/AB8G92ZnSCM0Qmn20fy/jj7ISqHB1M0EhZivD4DhJAV5d 7C1s1sudfzkdaBlUqIGKDBfyFtNxdbdPpShkcB3KK9/RFFed0EnkrvGYTxwKef/lOPt0 ZvMSjAIUf+TRSV1pViSzrWKHfMzuxYegsT3hnk4O1cAx4oBX3tzitAZFz842ilHOVGLp l+lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NshyEaDwfAFUbQgz9v/7PAZv2D6YFfD4mJuzrspfMok=; b=T03rjKkDZBtQQe6YpsDt17vjHGBXGmgCC9J5zRQa7hi8Rmr+bJ1E07lvb1L5c4Lz20 vw39LW0DY9iF8r5TF+ksvLeahRgopgC5CkEMo6R0QbWhlh2ZVJfUiS9hfAEL0WW7Pdye My5xMogkhJ0bfqLpWU0Q+KWriqRa1+pGUh5E6HHYnig3FyWcBvuMoYhpGIygDCJZ5G2X Abi74b+paYLsqA6Ae4nhd9VP5aHZM615Jc0ojCCOP5AENnBmUXUyZWbXBNqG4C9zWfj3 0WacqRoLVnnSAol+xKE/neS1UJmO6I5aSM+s0r7e2sn04ZZ3DLeRaFFIr1FFel3v6/EG D2/A== X-Gm-Message-State: AKaTC00RSDITVw0TZZLfprsuDDUuSwptyPYMMzp3V9JKzCFcmw7DJQnMwjDhiZwp7hRWyZ94ZcQ0o2Yt3eno7Q== X-Received: by 10.194.148.4 with SMTP id to4mr72742149wjb.194.1481377286418; Sat, 10 Dec 2016 05:41:26 -0800 (PST) MIME-Version: 1.0 References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> In-Reply-To: <8760msmdq1.fsf@gmail.com> From: Philipp Stephani Date: Sat, 10 Dec 2016 13:41:16 +0000 Message-ID: Content-Type: multipart/alternative; boundary=089e0118454cef77e805434e06fd X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --089e0118454cef77e805434e06fd Content-Type: text/plain; charset=UTF-8 Tino Calancha schrieb am Sa., 10. Dez. 2016 um 08:45 Uhr: > Eli Zaretskii writes: > > >> From: Alex > >> Date: Fri, 09 Dec 2016 17:36:15 -0600 > >> > >> Compare the following: > >> > >> (let ((x 5) > >> (x 6)) > >> (+ x 10)) > >> > >> => 16 > >> > >> (cl-letf ((x 5) > >> (x 6)) > >> (+ x 10)) > >> > >> => 15 > > > > Isn't it true that the order of evaluation in a 'let' is unspecified? > > If you want a particular order, use 'let*'. > Right, the order of evaluation in a let is up to the implementation. A > program > should not rely on such details. > The same statement should apply to cl-letf. > > > > I think that should be mentioned explicitly in the manuals: given that the order of value evaluations is specified, people might expect the same for the bindings themselves. --089e0118454cef77e805434e06fd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Tino C= alancha <tino.calancha@gmail.= com> schrieb am Sa., 10. Dez. 2016 um 08:45=C2=A0Uhr:
Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alex <agrambot@gmail.com>
>> Date: Fri, 09 Dec 2016 17:36:15 -0600
>>
>> Compare the following:
>>
>> (let ((x 5)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0(x 6))
>>=C2=A0 =C2=A0(+ x 10))
>>
>> =3D> 16
>>
>> (cl-letf ((x 5)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(x 6))
>>=C2=A0 =C2=A0(+ x 10))
>>
>> =3D> 15
>
> Isn't it true that the order of evaluation in a 'let' is u= nspecified?
> If you want a particular order, use 'let*'.
Right, the order of evaluation in a let is up to the implementation.=C2=A0 = A program
should not rely on such details.
The same statement should apply to cl-letf.




I think that shoul= d be mentioned explicitly in the manuals: given that the order of value eva= luations is specified, people might expect the same for the bindings themse= lves.
--089e0118454cef77e805434e06fd-- From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 14:03: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 To: Philipp Stephani Cc: Eli Zaretskii , 25154@debbugs.gnu.org, Alex , Tino Calancha Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148137852921202 (code B ref 25154); Sat, 10 Dec 2016 14:03:02 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 14:02:09 +0000 Received: from localhost ([127.0.0.1]:36635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFiE5-0005Vu-BA for submit@debbugs.gnu.org; Sat, 10 Dec 2016 09:02:09 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFiE4-0005VV-6n for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 09:02:08 -0500 Received: by mail-pg0-f68.google.com with SMTP id p66so5410358pga.2 for <25154@debbugs.gnu.org>; Sat, 10 Dec 2016 06:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=wlQC8kFQnW8NciuTeXmQnaZa3l/yXNfybUX5dSWYfg0=; b=lA5bi/YI5oNBx0aG5daRZvjN/rEoDk2N9ohJVI9uaMpmrFuMNPTStar5JwtS+438lO uQh634j1sMt20v3dGwkuyJy5wkoyv5usFy1METlIzaHeOQ/B8QwCzR3+1QRdY9Pk0KUI r44URpzBQLtdMZ8sLu3PNQJPRCBujWidpfuMe4VA4MsBQnxZISEyJpKEkAqaqUn3Ih/L FXALOkp5LGoORTcLIdRo/VLLG5th7agQS/dhkM0Sk7bepC8YDPzOlF2sZWZLnmjB+fKP fOmgk7WQ3a+QT0hmwW7J+MzDxtGbrjKY8Y11+dgjLyViTD9lFlJ1sLcTyoBaCHMY7YL2 GpPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=wlQC8kFQnW8NciuTeXmQnaZa3l/yXNfybUX5dSWYfg0=; b=W3FF1U0SkRWHRTVJnc/vbOto/+y3zH8OdrKwSLUXz+s7+24MB7ohT3gaazlZnACaR8 h1xdxtMUyEP3jGxeRybrMLPBXiWQ4P5jO19wGbC3Q6W9hsko7n+28oACkiP8o2tOyuBA xn6kZAFDKMhp/3Ovfvhm+uZNsfds+xdgoBZ/OqmT8KJn6mhH9R9b5DJyKp+0QqU/XQ4P o4VuytgnCCTKGezTpdB9Mf8JQ3Jty8vSooiBoWV+u9az842AsEIvOMbc5GTiPX5JcaAP K/O1HOW4WLL3765Cp7X2BrIOz/EhkoPQI10ZSi8+6gm3Z4Ow0FTbqpn2RbdRLRfyofI+ IYGQ== X-Gm-Message-State: AKaTC03IRtTQQiulcFa6bVgk4MCAIbT3zLALXUpSUVhe3hJuVt7XWziEE9d2ng5hVAQwXw== X-Received: by 10.99.146.76 with SMTP id s12mr151972170pgn.8.1481378522568; Sat, 10 Dec 2016 06:02:02 -0800 (PST) Received: from calancha-pc (177.192.218.133.dy.bbexcite.jp. [133.218.192.177]) by smtp.gmail.com with ESMTPSA id y200sm64940368pfb.16.2016.12.10.06.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Dec 2016 06:02:01 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 10 Dec 2016 23:01:55 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: Message-ID: References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-378543943-1481378521=:22291" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-378543943-1481378521=:22291 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Sat, 10 Dec 2016, Philipp Stephani wrote: > > > Tino Calancha schrieb am Sa., 10. Dez. 2016 um 08:45 Uhr: > Eli Zaretskii writes: > > Right, the order of evaluation in a let is up to the implementation.  A program > should not rely on such details. > The same statement should apply to cl-letf. Sorry, i meant above the order of 'assign the bindings' is up to the implementation. > I think that should be mentioned explicitly in the manuals: given that the order of value evaluations is specified, people might > expect the same for the bindings themselves. Yes, it's worth to remark than in the manual. --8323329-378543943-1481378521=:22291-- From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 14:10:01 +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 To: Philipp Stephani Cc: 25154@debbugs.gnu.org, agrambot@gmail.com, tino.calancha@gmail.com Reply-To: Eli Zaretskii Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148137896621925 (code B ref 25154); Sat, 10 Dec 2016 14:10:01 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 14:09:26 +0000 Received: from localhost ([127.0.0.1]:36640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFiL8-0005hZ-40 for submit@debbugs.gnu.org; Sat, 10 Dec 2016 09:09:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFiL7-0005hM-DU for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 09:09:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFiL1-0003bS-8N for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 09:09:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFiKw-0003Zi-Ni; Sat, 10 Dec 2016 09:09:14 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1432 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cFiKv-0005rB-Hc; Sat, 10 Dec 2016 09:09:14 -0500 Date: Sat, 10 Dec 2016 16:09:45 +0200 Message-Id: <83r35fg9jq.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Philipp Stephani on Sat, 10 Dec 2016 13:41:16 +0000) References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.0 (--------) > From: Philipp Stephani > Date: Sat, 10 Dec 2016 13:41:16 +0000 > Cc: 25154@debbugs.gnu.org, Alex > > > Isn't it true that the order of evaluation in a 'let' is unspecified? > > If you want a particular order, use 'let*'. > Right, the order of evaluation in a let is up to the implementation. A program > should not rely on such details. > The same statement should apply to cl-letf. > > I think that should be mentioned explicitly in the manuals: given that the order of value evaluations is specified, > people might expect the same for the bindings themselves. I agree, patches to that effect are welcome. (AFAICT, the manual tries to say that already, but the wording could be more explicit.) From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 18:06:01 +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 To: Eli Zaretskii Cc: 25154@debbugs.gnu.org Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148139315819937 (code B ref 25154); Sat, 10 Dec 2016 18:06:01 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 18:05:58 +0000 Received: from localhost ([127.0.0.1]:37212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFm21-0005BV-Vd for submit@debbugs.gnu.org; Sat, 10 Dec 2016 13:05:58 -0500 Received: from mail-io0-f178.google.com ([209.85.223.178]:33636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFm20-0005BI-Ew for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 13:05:56 -0500 Received: by mail-io0-f178.google.com with SMTP id d9so108408216ioe.0 for <25154@debbugs.gnu.org>; Sat, 10 Dec 2016 10:05:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=OaGq1bfP/trsUsoXmf2l55nJtGgfa85NozxzTREyoKU=; b=CAlDbFk9fVP8Bi1H2hvLBtN7XMGLviGmmFklR8blg4ev+xVw3vBr4jzaSKRbJbUPjv /uJbrXwdDiE2CLFWO8boK7hXmRdxKb+QTTrI2CA/QGNLqAcGA0mSQUlivVsocQ3ktbKi roSCc0murX8LJe+IGh+81ExlYNWwhQfdaNbI/Ek1FUeCpn8kdXiIi4yBvBLYSK5pFGqQ z9udc5VpUKD/Eha6veTrCIG3SxPKEPi/ExOvkGiyV0JeWWEdB+EcP0wiU725ZvdB713J /c8B+CjNaXJpeBtlrYYU2EA7bUiULXXbi1qbyalY1rm7+yXFkhBZ9vQ7jpbgyScTqGM3 +Qyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=OaGq1bfP/trsUsoXmf2l55nJtGgfa85NozxzTREyoKU=; b=Wj4AHe3nC6cO2AtWm5ufMnsvE3oYtLHPEAmnFB74dNbPBapILAQ8fuyWm123pe9PSs fl0ZkSBVbwZG4EkWhKyaTvcr53PsP6Oi8FzziMjLNZiwnLP5G4AItKVCUp3Ymq2t9Rz6 hyJwnHVe/8ljZUmvLhl8Dw8f/3P00G7Su5l336BwdiiHDpkjT3twuwNinKqhPvY81j9R 5BgkQvTGqvKCv2xWvVcOqeU+rx2JhnfJFUwiTNUjwyECXDxh2Qg937BxkAe19JPXjQec Oc7xSYD1dEFCWfmmNPFH5vOorAeRVVrzX9uiRg2xe+lEhPY3J8crgOA2FX+D5k27rYgS qPEg== X-Gm-Message-State: AKaTC03zV5MCaHg/dzWR4c2gwbzGndpLB+MHXe/kN8Y54PO0YECMVJGU8Vwt1xHuStb8SA== X-Received: by 10.107.183.148 with SMTP id h142mr71690539iof.190.1481393151065; Sat, 10 Dec 2016 10:05:51 -0800 (PST) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id x190sm9093639ite.14.2016.12.10.10.05.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Dec 2016 10:05:50 -0800 (PST) From: Alex In-Reply-To: <83zik4fdug.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Dec 2016 09:22:15 +0200") References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Date: Sat, 10 Dec 2016 12:05:40 -0600 Message-ID: <87bmwjy80b.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Alex >> Date: Fri, 09 Dec 2016 17:36:15 -0600 >> >> Compare the following: >> >> (let ((x 5) >> (x 6)) >> (+ x 10)) >> >> => 16 >> >> (cl-letf ((x 5) >> (x 6)) >> (+ x 10)) >> >> => 15 > > Isn't it true that the order of evaluation in a 'let' is unspecified? > If you want a particular order, use 'let*'. I don't think so. See (info "(elisp) Local Variables"): All of the VALUE-FORMs in BINDINGS are evaluated in the order they appear I believe it should follow for cl-letf. Besides, even if it was unspecified, evaluating in the order they appear would be adhering to the principle of least astonishment. Though I realize that I have made a mistake in naming this bug and patch. The bigger issue is that all (PLACE VALUE) pairs of each type (simple and more importantly complex) were being evaluated in reverse order. Take for example: (cl-letf (((aref v 1) 10) ((aref w 2) 20)) (aref v 1)) This approximately expands to: (let* ((v v) (v w) (old (aref v 2)) (old (aref v 1))) (unwind-protect (progn (aset v 2 20) (aset v 1 10) (aref v 1)) (aset v 2 old) (aset v 1 old))) As you can see, the arefs and asets are evaluated in reverse order. Again, even if you argue that the order of evaluation for (PLACE VALUE) pairs is unspecified, it's evaluating them in an unexpected way for no good reason. I have attached a reworded patch that expands the above into the more expected: (let* ((v v) (v w) (old (aref v 1)) (old (aref v 2))) (unwind-protect (progn (aset v 1 10) (aset v 2 20) (aref v 1)) (aset v 1 old) (aset v 2 old))) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Preserve-the-order-of-PLACE-VALUE-pairs-in-cl-letf.patch Content-Description: cl-letf patch reworded >From 184fa8dcb738923994d4b287931849b182bdb522 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Fri, 9 Dec 2016 22:10:54 -0600 Subject: [PATCH] Preserve the order of (PLACE VALUE) pairs in cl-letf Do not reverse the order of (PLACE VALUE) pairs in cl-letf (Bug #25154). * lisp/emacs-lisp/cl-macs.el (cl--letf): Use nreverse to restore the order of (PLACE VALUE) pairs. --- lisp/emacs-lisp/cl-macs.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 210a208..34f124f 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2388,7 +2388,10 @@ cl--letf ;; VAL1; VAL2; PLACE1; bind1; PLACE2; bind2 ;; Common-Lisp's `psetf' does the first, so we'll do the same. (if (null bindings) - (if (and (null binds) (null simplebinds)) (macroexp-progn body) + (if (and (null binds) (null simplebinds)) + (macroexp-progn body) + (setq binds (nreverse binds)) + (setq simplebinds (nreverse simplebinds)) `(let* (,@(mapcar (lambda (x) (pcase-let ((`(,vold ,getter ,_setter ,_vnew) x)) (list vold getter))) -- 2.10.2 --=-=-=-- From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 18:14:01 +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 To: Alex Cc: Eli Zaretskii , 25154@debbugs.gnu.org Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148139364020692 (code B ref 25154); Sat, 10 Dec 2016 18:14:01 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 18:14:00 +0000 Received: from localhost ([127.0.0.1]:37217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFm9n-0005Ng-Rn for submit@debbugs.gnu.org; Sat, 10 Dec 2016 13:14:00 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:35583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFm9m-0005NT-1u for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 13:13:58 -0500 Received: by mail-io0-f177.google.com with SMTP id h30so109725715iod.2 for <25154@debbugs.gnu.org>; Sat, 10 Dec 2016 10:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=iNtKqbsu3HdVM+zOtzvsKPoujNGBZWzIc6xplBbJ0Sg=; b=mHdHzi1sXaip08I8l2XLpMeszToY8Fb4ZRQQ0DBukHBu+5x87iOEBXyPani43uQ6gM DZpSOJFO90HXVu+Za2AmNGeGrhcrvTJdZKhB62yniyPVvbzSHjiEeInmSqbW/r7aln1e 8IpozXd54jI95utG0cVps9yXfv0/ZFQCC+JBXC8yT5UTxOub43irsqmwCyuDwFsfkMhR 0pD2/4oFN3jERK1JDNY560//viTiIIK5NHEW/YvFNIUU967qwKvo2QEkzRjZTbHZ33yq PVNg4IgM13WOIKqdR+H6ZOme1mLK/xdxE3TqlSyoea3E6TJTGE5Yz8O2ocbPGRxHH5a8 VwpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=iNtKqbsu3HdVM+zOtzvsKPoujNGBZWzIc6xplBbJ0Sg=; b=MuCjSt3S1UDquaVHRYrW4UPCyFrh8QzGvTI8SyHRJ6TQtD1dNnATr00KwzqElzieya dpTv/7fxo6uONEq5E5RTOPxU7kZVoHuxNz/kzdmZ87mL/lSvUcrWTjtPMSVnvOS7Cc5s FvvnfobAsSdGILaGaM8E1Q5/VlRSDZYXdY6d8urqEwIxOgvRk2KO+I4C7bbP7Zw5uEAw lTSoTLfoJ0gsb8oj+nbp+H4GbzHH/Q6U0aH8M7QLgcBLrLjpRlfAOKrQ5EZeAQCKjk4t p8MT+jq20Bshg23vRmI0p6pQFfTLQUTdUlYBHatGUoIciqWg0unSmyNPw2MGQ6K+wrp/ S2SA== X-Gm-Message-State: AKaTC00WlUI2JxNBK7qnhxX2BTSsnHKT9ELPe1IyfOTYcInjZIufzMHVxdcC+FQ2+1IUoQ== X-Received: by 10.107.28.129 with SMTP id c123mr75799240ioc.11.1481393632659; Sat, 10 Dec 2016 10:13:52 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id n206sm1483895itg.1.2016.12.10.10.13.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Dec 2016 10:13:52 -0800 (PST) From: npostavs@users.sourceforge.net References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <87bmwjy80b.fsf@gmail.com> Date: Sat, 10 Dec 2016 13:14:54 -0500 In-Reply-To: <87bmwjy80b.fsf@gmail.com> (Alex's message of "Sat, 10 Dec 2016 12:05:40 -0600") Message-ID: <87bmwjejmp.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Alex writes: >> >> Isn't it true that the order of evaluation in a 'let' is unspecified? >> If you want a particular order, use 'let*'. > > I don't think so. See (info "(elisp) Local Variables"): > > All of the VALUE-FORMs in BINDINGS are evaluated in the order they > appear > > I believe it should follow for cl-letf. Besides, even if it was > unspecified, evaluating in the order they appear would be adhering to > the principle of least astonishment. The value forms are evaluated in order, the bindings are not necessarily in order. (let ((x 0)) (cl-letf ((a (setq x 1)) (a (setq x 2))) (list x a))) ;=> (2 1) Although `let' does happen to perform the bindings in order too. (let ((x 0)) (let ((a (setq x 1)) (a (setq x 2))) (list x a))) ;=> (2 2) From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 18:28: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 To: Alex Cc: 25154@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148139445622103 (code B ref 25154); Sat, 10 Dec 2016 18:28:02 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 18:27:36 +0000 Received: from localhost ([127.0.0.1]:37223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFmMy-0005kR-36 for submit@debbugs.gnu.org; Sat, 10 Dec 2016 13:27:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFmMw-0005kD-0z for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 13:27:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFmMn-0004Oc-LO for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 13:27:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFmMn-0004OY-I1; Sat, 10 Dec 2016 13:27:25 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1734 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cFmMk-0001Rt-OP; Sat, 10 Dec 2016 13:27:25 -0500 Date: Sat, 10 Dec 2016 20:27:40 +0200 Message-Id: <838trnfxlv.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87bmwjy80b.fsf@gmail.com> (message from Alex on Sat, 10 Dec 2016 12:05:40 -0600) References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <87bmwjy80b.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.0 (--------) > From: Alex > Cc: 25154@debbugs.gnu.org > Date: Sat, 10 Dec 2016 12:05:40 -0600 > > > Isn't it true that the order of evaluation in a 'let' is unspecified? > > If you want a particular order, use 'let*'. > > I don't think so. See (info "(elisp) Local Variables"): > > All of the VALUE-FORMs in BINDINGS are evaluated in the order they > appear That's the evaluation order. Your code relies on the order of _binding_ variables to values, which is unspecified. Contrast the above with the description of 'let*' below it. From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 19:42: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 To: npostavs@users.sourceforge.net Cc: Eli Zaretskii , 25154@debbugs.gnu.org Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148139887429379 (code B ref 25154); Sat, 10 Dec 2016 19:42:02 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 19:41:14 +0000 Received: from localhost ([127.0.0.1]:37265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFnWD-0007dm-PM for submit@debbugs.gnu.org; Sat, 10 Dec 2016 14:41:13 -0500 Received: from mail-io0-f176.google.com ([209.85.223.176]:32899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFnWC-0007dZ-IN for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 14:41:12 -0500 Received: by mail-io0-f176.google.com with SMTP id d9so110626481ioe.0 for <25154@debbugs.gnu.org>; Sat, 10 Dec 2016 11:41:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=N9IVPrvh0tDl6nSqnL9Pgq8Sdb4yC1N5FS31C7WGCuM=; b=ydU3ReRgmzncDjwemNpE8H6j6rAeSqovEcCih1TbRYMFfLLHwINWjRmLVXJdn2j2MQ 6/mmW8vcSbHiW6ACb26SRPcfhG1E1mTZ6wiOqfnM6Eu/0CuAhwzOMhK4wCoSSCYGcWwO TCtGn42lmsLmMFOf/VovDlaDS5x3T3M9gb0fgfGffavKCSdZAnxS/r/Bso+fimn6VJb3 7mDObaOangBc+Sv8I0yu05D9E6RaGk1Da1nIVnFDPE5zrXQPYfMWr+loxvVXBKcoIMTh RTI/jeITcWNI1mgfPmkVwVNNt+egt4rKMEPTMz7dONeqMe9Zaf+26pC6Vi2YxdG5466c FY/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=N9IVPrvh0tDl6nSqnL9Pgq8Sdb4yC1N5FS31C7WGCuM=; b=MiAoE/9/I9Mv+3cg08LrWYndHICxD5AM/cbKE944DQ54UlDCOjYskYgmqOkm5wxqHn JyMuGFEehp1c5eTmEpjw4lT3W5vBrCxnuVga8ki59Dx8zCjhAvGZ0MpLlR3uAtdK65ZN BXtdFB0pw5RMMAkBLHNmefsPIylHS7BM6ud9AuYjLKt0ooiIMfVklg0bdgyw2jKIZcKo hA9T+bFHS67yq34CrJCRVOZt3ir75VFlV/oiQlk+vJ07Lkfwtoe5PGLV+YxhS/NrWjxi mELZHBl1HsPdRvKSCvdyX3EAR8UGwaaWHY//AjJxt+hR21asZSdeVcgruPLMYif3mASW dTtg== X-Gm-Message-State: AKaTC005DO0p3UL4+eIjyJClA7Dq616cxGEs9oRreTfqhcPLKvlmWwQwmnGxddrYjTWMrg== X-Received: by 10.36.83.15 with SMTP id n15mr3885901itb.79.1481398866744; Sat, 10 Dec 2016 11:41:06 -0800 (PST) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id j201sm9204196ita.2.2016.12.10.11.41.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Dec 2016 11:41:06 -0800 (PST) From: Alex References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <87bmwjy80b.fsf@gmail.com> <87bmwjejmp.fsf@users.sourceforge.net> Date: Sat, 10 Dec 2016 13:41:04 -0600 In-Reply-To: <87bmwjejmp.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 10 Dec 2016 13:14:54 -0500") Message-ID: <874m2by3lb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) npostavs@users.sourceforge.net writes: > Alex writes: > >>> >>> Isn't it true that the order of evaluation in a 'let' is unspecified? >>> If you want a particular order, use 'let*'. >> >> I don't think so. See (info "(elisp) Local Variables"): >> >> All of the VALUE-FORMs in BINDINGS are evaluated in the order they >> appear >> >> I believe it should follow for cl-letf. Besides, even if it was >> unspecified, evaluating in the order they appear would be adhering to >> the principle of least astonishment. > > The value forms are evaluated in order, the bindings are not necessarily > in order. > > (let ((x 0)) > (cl-letf ((a (setq x 1)) > (a (setq x 2))) > (list x a))) ;=> (2 1) Right, this expands to: (let ((x 0)) (let* ((vnew (setq x 1)) (vnew (setq x 2)) (a vnew) (a vnew)) (unwind-protect (list x a)))) Which, outside of the case of repeating the variable name (which arguably shouldn't be allowed like in some other Lisps), doesn't matter. It only matters when using more complex places like (cl-letf (((aref v 1) 10) ((aref w 2) 20)) (aref v 1)) From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 19:53:01 +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 To: Eli Zaretskii Cc: 25154@debbugs.gnu.org Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148139956430481 (code B ref 25154); Sat, 10 Dec 2016 19:53:01 +0000 Received: (at 25154) by debbugs.gnu.org; 10 Dec 2016 19:52:44 +0000 Received: from localhost ([127.0.0.1]:37273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFnhM-0007vZ-2Q for submit@debbugs.gnu.org; Sat, 10 Dec 2016 14:52:44 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:34952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFnhK-0007vK-3z for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 14:52:42 -0500 Received: by mail-io0-f177.google.com with SMTP id h30so112006984iod.2 for <25154@debbugs.gnu.org>; Sat, 10 Dec 2016 11:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=2o5+4muqmC8bGT4j0ISTRZaYSmNGFTi1sfNa8TTsTa8=; b=S0xojpw7W9pfWwmGz0bMgl2EyPv0lKMsdN2/De+65kVGMLOymR0X7AtDAetNJE2koO ofa1/OvCNBzlOt0oOuDdZBIzIgLeb6urrbRSBaLN63TrM57Zp2H/ScnhghaoydfRGHys 0InwplDi6zJUzYTsAeMsg4rt+0aKosRE7kvzWJEOjSLlpWNLXk8JMveBoZfo8azocT5s K+h3MwJvkkfVy+ndZnpcswgMZ1AUVUaLsej9mMcL2GitmjiuAbDoMEOLuB/iYzJ8okX/ HSqMeW6BI4vvM2d0I6t1DJBy6w5xJCdX4V5c8UXrxSlQPtxyLMah0MoJ8Ikr3GrNqVCm p87Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=2o5+4muqmC8bGT4j0ISTRZaYSmNGFTi1sfNa8TTsTa8=; b=dxoLWscP2VYUmM5Md9xgAyrzmoSMIHXlHtwAEn7nWaTCRBks24iARsc7ItjO9v/J9K CNA7sXJbVnv23wC5y/jCNiSZJCosMftYXFlZC+lA3kKqEP5JFr+Io3lthRrghMxuwhlJ 9p9SU1npxixXzFejGsnqIfxSseFgzIo+jB81+WrbobURo/Y9AKbtBhggNF4bupGhsN76 AKkoJjubi2oiNyiEfr0rYMdT0eXvu3DZ0keVdn/2CpKxJpuuO6AKfGmrXGnK33NXK/DP Ltd+8OqejYH6QyXaGl8VW2PtAZp4P5090L4xEGNL4H6M+qgJbJYPM1lp0TlbGHmDWWKY p5eA== X-Gm-Message-State: AKaTC00uVHlaU9KQk+bq1AYdD3jKfc9be2HCKdCZd8Jt50Qg3kOSYaEM1TlqdwmxCnH3DQ== X-Received: by 10.36.73.156 with SMTP id e28mr3865710itd.49.1481399556424; Sat, 10 Dec 2016 11:52:36 -0800 (PST) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id b196sm16806351ioe.16.2016.12.10.11.52.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Dec 2016 11:52:35 -0800 (PST) From: Alex References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <87bmwjy80b.fsf@gmail.com> <838trnfxlv.fsf@gnu.org> Date: Sat, 10 Dec 2016 13:52:34 -0600 In-Reply-To: <838trnfxlv.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Dec 2016 20:27:40 +0200") Message-ID: <87zik3wohp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Eli Zaretskii writes: >> From: Alex >> Cc: 25154@debbugs.gnu.org >> Date: Sat, 10 Dec 2016 12:05:40 -0600 >> >> > Isn't it true that the order of evaluation in a 'let' is unspecified? >> > If you want a particular order, use 'let*'. >> >> I don't think so. See (info "(elisp) Local Variables"): >> >> All of the VALUE-FORMs in BINDINGS are evaluated in the order they >> appear > > That's the evaluation order. Yes, which is what the (nreverse binds) in my patch actually affects, despite the name of the variable being `binds'. This is why I said that my choice of wording for this bug report was wrong, as it focused on a less important problem. As said in my last email, the expression: (cl-letf (((aref v 1) 10) ((aref w 2) 20)) (aref v 1)) expands to: (let* ((v v) (v w) (old (aref v 2)) (old (aref v 1))) (unwind-protect (progn (aset v 2 20) (aset v 1 10) (aref v 1)) (aset v 2 old) (aset v 1 old))) which does indeed evaluate the arefs and asets in reverse order. This is the most important part of my patch. > Your code relies on the order of > _binding_ variables to values, which is unspecified. Contrast the > above with the description of 'let*' below it. Just the (nreverse simplebinds) line, which I added just to make cl-letf a little bit saner (i.e. more like let). This part does seem to be unspecified, but I don't see why it should unnecessarily diverge from let. From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2016 03:12:01 +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 To: Alex Cc: Eli Zaretskii , tino.calancha@gmail.com, 25154@debbugs.gnu.org, Philipp Stephani , npostavs@users.sourceforge.net Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148142588915136 (code B ref 25154); Sun, 11 Dec 2016 03:12:01 +0000 Received: (at 25154) by debbugs.gnu.org; 11 Dec 2016 03:11:29 +0000 Received: from localhost ([127.0.0.1]:37424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFuXx-0003w3-F8 for submit@debbugs.gnu.org; Sat, 10 Dec 2016 22:11:29 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFuXv-0003vn-OB for 25154@debbugs.gnu.org; Sat, 10 Dec 2016 22:11:28 -0500 Received: by mail-pf0-f194.google.com with SMTP id y68so2841522pfb.1 for <25154@debbugs.gnu.org>; Sat, 10 Dec 2016 19:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=EL3P0PCdsIyzPHHrcUC7D3OkBEUYANsQ2cJJKhWCaDE=; b=rYcTBVDwnuE8DchSE5XklXjgEByzGil3naP2mNbe0Enno7h1yBAyJiZu6bdUkkDFMt JYIEkGGU5qYXG1SszgEdn3LsgmnMgR4jTlrYlgMatyDZBcmdCzGyAq8+QNVLxkrsesYX OzvOOssahZiO2+kxYezYUilSTRdAs6067PiOrkFxiBhlVO8aMsWV+fHytw4g0h7aC2zD t/tOAOhz7w1mj9ebxsuVp34/yKjYdCX+UJqk3QN4Nr3GfCLcptoeb5/5voNFBueCY4BQ t5+nrYEqW9BRpir1Sv5R0woLWV6fAlqJWxTv83qjcPpW7z4cv389wYfJoLlL1qjIudg+ ZYEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=EL3P0PCdsIyzPHHrcUC7D3OkBEUYANsQ2cJJKhWCaDE=; b=OYONz0jkG9RRPo/PGtk8VCERKOSXSiMkK1i8J3dqXOsI/WTIyEMtSemGbzK6KIo2ap eXCgOP9IM3QBkbMuxQlm0V7+gjfLdcTXOvTSKFQcX2N24fLFqdVWFVcD/m0x16z0japf pUE//25XXjjhA1qPl1e22eDbtAbxWkyMJwAvsC24hXIl0+WGW+MFgHQ1oqVn0IssEI8L g6eWb5UP12irJcgUXWg2rAAS1oghfxas8ZfAcIF5lFH50NKjB0HFB1KF/qvD1jXktgsu UTL8gc2LvoQri2q/wfCH1r5/fYX0XX80tikBfIkvtKgF5xgh0abOkOE2Mr9NsNpaAfXz tG8Q== X-Gm-Message-State: AKaTC01O/Cai22b6x7H29XtRuPqFPqmVuhgmerwKK8w5FRJ/aicIo3d7fASnyasEeN9AZw== X-Received: by 10.99.119.71 with SMTP id s68mr157152182pgc.11.1481425881975; Sat, 10 Dec 2016 19:11:21 -0800 (PST) Received: from calancha-pc (177.192.218.133.dy.bbexcite.jp. [133.218.192.177]) by smtp.gmail.com with ESMTPSA id t89sm67101381pfe.50.2016.12.10.19.11.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Dec 2016 19:11:21 -0800 (PST) From: Tino Calancha References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <87bmwjy80b.fsf@gmail.com> <838trnfxlv.fsf@gnu.org> <87zik3wohp.fsf@gmail.com> Date: Sun, 11 Dec 2016 12:11:16 +0900 In-Reply-To: <87zik3wohp.fsf@gmail.com> (Alex's message of "Sat, 10 Dec 2016 13:52:34 -0600") Message-ID: <87zik317or.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi Alex, thank you for your report and your time! I answer you below. >> Isn't it true that the order of evaluation in a 'let' is unspecified? >> If you want a particular order, use 'let*'. >I don't think so. See (info "(elisp) Local Variables"): > All of the VALUE-FORMs in BINDINGS are evaluated in the order they > appear Eli means here "order on the bindings assignment is unspecified in a 'let'". Programs shouldn't rely on any particular order in the assigments: it's an implementation detail. >This approximately expands to: > >(let* > ((v v) > (v w) > (old > (aref v 2)) > (old > (aref v 1))) > (unwind-protect > (progn > (aset v 2 20) > (aset v 1 10) > (aref v 1)) > (aset v 2 old) > (aset v 1 old))) > >As you can see, the arefs and asets are evaluated in reverse order. >Again, even if you argue that the order of evaluation for (PLACE VALUE) >pairs is unspecified, it's evaluating them in an unexpected way for no >good reason. There is a good reason: the result code implementing cl-letf is simpler. Your patch unnecessarily adds calls to `setq' and `nreverse'. That result in longer code and less efficient. Bear in mind that `let' and `cl-letf' are written in different languages; the former in C, the latter in elisp. As far as those implementations satisfy their specification, the simpler and more efficient that they can be the better. >> The value forms are evaluated in order, the bindings are not necessarily >> in order. >> >> (let ((x 0)) >> (cl-letf ((a (setq x 1)) >> (a (setq x 2))) >> (list x a))) ;=> (2 1) > >Right, this expands to: > >(let ((x 0)) > (let* > ((vnew > (setq x 1)) > (vnew > (setq x 2)) > (a vnew) > (a vnew)) > (unwind-protect > (list x a)))) > >Which, outside of the case of repeating the variable name (which >arguably shouldn't be allowed like in some other Lisps), doesn't matter. > >It only matters when using more complex places like > >(cl-letf (((aref v 1) 10) > ((aref w 2) 20)) > (aref v 1)) No it doesn't matter, because as pointed out above the order to perform the parallel bindings is unspecified. It might start binding from left to right, or right to left, or even random order using the current time as a seed. Code relying in a particular order for those bindings is not portable, even more, it has a bug; we might change the implemention in the future for whatever reason producing a different order: then such code will break. If you want the bindings being perform from left to right, then you just need to use sequential `letf*'/`cl-letf*' instead of the parallel `let'/`cl-letf'. >Just the (nreverse simplebinds) line, which I added just to make cl-letf >a little bit saner (i.e. more like let). This part does seem to be >unspecified, but I don't see why it should unnecessarily diverge from >let. In addition to result in a simpler implementation, it's useful as a reminder that code shouldn't assume a particular order. Even if i don't see any problem with `cl-letf' implementation, i agree with Philipp and Eli that it would be worth if the outcome of this report is an improvement in the documentation. We might update the manual adding a more precise statement to clarify that the order to perform the parallel bindings is unspecified, i.e., code should not assume a particular order. As Eli said patches are welcome. Alex, are you willing to prepare those doc patches? Thank you very much, Tino From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Dec 2016 12:19:01 +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 To: Eli Zaretskii Cc: 25154@debbugs.gnu.org, agrambot@gmail.com, tino.calancha@gmail.com Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148249549412792 (code B ref 25154); Fri, 23 Dec 2016 12:19:01 +0000 Received: (at 25154) by debbugs.gnu.org; 23 Dec 2016 12:18:14 +0000 Received: from localhost ([127.0.0.1]:52103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKOnd-0003KF-Kd for submit@debbugs.gnu.org; Fri, 23 Dec 2016 07:18:13 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:33409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKOnb-0003K1-J2 for 25154@debbugs.gnu.org; Fri, 23 Dec 2016 07:18:12 -0500 Received: by mail-wm0-f47.google.com with SMTP id m1so3431058wme.0 for <25154@debbugs.gnu.org>; Fri, 23 Dec 2016 04:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qKNVfp31im1pGar1E2htGPuwPSBfKDFJhdJAc3PQKM8=; b=HFOx/NKemAbdXJJyeGrUE+Y35KNXuWoTXaBMaEorC1wPW1a4xa7Q7Gx9l23bt1PGJ4 zn0lRbFU7xsyfdzpK4t87yoHLMdh7jaO/5kr3BmQsD1tvaoWvhKReZjjRXGk74VR71pn zhK66Zc/1Qef0+84K5gHVicKuf7M2gYFsBiX97sb7jxwprFrbJq+giGFkXXhy+lQ116b 13j0TqaeIbvDobL8RGBEroZ5bf6Fc2fZCRw4gZl8bwfzKq2n4pZGt28ZNEvxz40PjETB a3Yv5xu0Oyk+8AiBkZXlmoEBzj8cnFZ0UNgdmNZJs43pNFVnnNZ8r60H7I/4iHtP5YRu +WHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qKNVfp31im1pGar1E2htGPuwPSBfKDFJhdJAc3PQKM8=; b=nRepNXysCnv8AoQVPNGicOGe8XaJTeLbd/XlFeeowOw3Ln3iLcIakbJz4YdYyoTvoc EnGtihZq6h/WO7jnAoAY1x7upUj3GwkgIoB56le9/vbHbKviVcemRLix6HYdjX4FIifY RFRBdCM/wYZEQAziAovGYVWBZYeiyu4cOzH+WZAq5qKu6l8bLzeyZDK9bnCOL10JIIJ/ 5gcocHV5S2WmBAvRY+kwUZajcrsre72aMDjjPQyxUR9KHM+FwbJJeb+WNe+1TxQyctRd ZFF3BXuytH46s49ELyNCUWMYxhri4IuiIYFaUor/61gw8jPvJ7KIUw1/kk5k0ZCTd3el Rqcw== X-Gm-Message-State: AIkVDXIdfbrd81LvzTQK9fDrNc/1lDYLi3mUug5UUc+L2iEoOLc2QTwYMej/l3tgj9Ce7BUbGYTBrv0hQHT9IA== X-Received: by 10.28.87.84 with SMTP id l81mr16352320wmb.48.1482495485640; Fri, 23 Dec 2016 04:18:05 -0800 (PST) MIME-Version: 1.0 References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> <83r35fg9jq.fsf@gnu.org> In-Reply-To: <83r35fg9jq.fsf@gnu.org> From: Philipp Stephani Date: Fri, 23 Dec 2016 12:17:54 +0000 Message-ID: Content-Type: multipart/mixed; boundary=001a11444cc4cdacc805445260fc X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --001a11444cc4cdacc805445260fc Content-Type: multipart/alternative; boundary=001a11444cc4cdacc205445260fa --001a11444cc4cdacc205445260fa Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am Sa., 10. Dez. 2016 um 15:09 Uhr: > > From: Philipp Stephani > > Date: Sat, 10 Dec 2016 13:41:16 +0000 > > Cc: 25154@debbugs.gnu.org, Alex > > > > > Isn't it true that the order of evaluation in a 'let' is unspecified? > > > If you want a particular order, use 'let*'. > > Right, the order of evaluation in a let is up to the implementation. A > program > > should not rely on such details. > > The same statement should apply to cl-letf. > > > > I think that should be mentioned explicitly in the manuals: given that > the order of value evaluations is specified, > > people might expect the same for the bindings themselves. > > 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. --001a11444cc4cdacc205445260fa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Sa., 10. Dez. 2016 um 15:09=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 10 Dec 2016 13:41:16 +0000
> Cc: 25154@debbugs.gnu.org, Alex <agrambot@gmail.com>= ;
>
>=C2=A0 > Isn't it true that the order of evaluation in a 'le= t' is unspecified?
>=C2=A0 > If you want a particular order, use 'let*'.
>=C2=A0 Right, the order of evaluation in a let is up to the implementat= ion. A program
>=C2=A0 should not rely on such details.
>=C2=A0 The same statement should apply to cl-letf.
>
> I think that should be mentioned explicitly in the manuals: given that= the order of value evaluations is specified,
> people might expect the same for the bindings themselves.

I agree, patches to that effect are welcome.=C2=A0 (AFAICT, the manual
tries to say that already, but the wording could be more explicit.)

OK, I've attached a pa= tch that hopefully clarifies this a bit.=C2=A0
--001a11444cc4cdacc205445260fa-- --001a11444cc4cdacc805445260fc Content-Type: text/plain; charset=US-ASCII; name="0001-Document-that-variable-binding-order-is-unspecified.txt" Content-Disposition: attachment; filename="0001-Document-that-variable-binding-order-is-unspecified.txt" Content-Transfer-Encoding: base64 Content-ID: <1592b9db413459154e1> X-Attachment-Id: 1592b9db413459154e1 RnJvbSA0MmQ3NDUwYzQxZDY5YTcxM2ViOGY5NDkyY2MxNjllOGMyYmMxNWNhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaGlsaXBwIFN0ZXBoYW5pIDxwaHN0QGdvb2dsZS5jb20+CkRh dGU6IEZyaSwgMjMgRGVjIDIwMTYgMTM6MTQ6NTUgKzAxMDAKU3ViamVjdDogW1BBVENIXSBEb2N1 bWVudCB0aGF0IHZhcmlhYmxlIGJpbmRpbmcgb3JkZXIgaXMgdW5zcGVjaWZpZWQKCiogZG9jL2xp c3ByZWYvdmFyaWFibGVzLnRleGkgKExvY2FsIFZhcmlhYmxlcyk6CiogY2wudGV4aSAoTW9kaWZ5 IE1hY3Jvcyk6IERvY3VtZW50IHRoYXQgYXNzaWdubWVudCBvcmRlciBpbiAnbGV0JyBhbmQKJ2Ns LWxldGYnIGlzIHVuc3BlY2lmaWVkLgotLS0KIGRvYy9saXNwcmVmL3ZhcmlhYmxlcy50ZXhpIHwg MTIgKysrKysrKysrKysrCiBkb2MvbWlzYy9jbC50ZXhpICAgICAgICAgICB8ICA1ICsrKysrCiAy IGZpbGVzIGNoYW5nZWQsIDE3IGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9kb2MvbGlzcHJl Zi92YXJpYWJsZXMudGV4aSBiL2RvYy9saXNwcmVmL3ZhcmlhYmxlcy50ZXhpCmluZGV4IGEyZDY0 ODE1ZDkuLmUyYzhjNTQyYWIgMTAwNjQ0Ci0tLSBhL2RvYy9saXNwcmVmL3ZhcmlhYmxlcy50ZXhp CisrKyBiL2RvYy9saXNwcmVmL3ZhcmlhYmxlcy50ZXhpCkBAIC0yMjEsNiArMjIxLDE4IEBAIExv Y2FsIFZhcmlhYmxlcwogICAgICBAcmVzdWx0e30gKDEgMikKIEBlbmQgZ3JvdXAKIEBlbmQgZXhh bXBsZQorCitPbiB0aGUgb3RoZXIgaGFuZCwgdGhlIG9yZGVyIG9mIEBlbXBoe2Fzc2lnbm1lbnRz fSBpcyB1bnNwZWNpZmllZDogaW4KK3RoZSBmb2xsb3dpbmcgZXhhbXBsZSwgZWl0aGVyIDEgb3Ig MiBtaWdodCBiZSBwcmludGVkLgorCitAZXhhbXBsZQorKGxldCAoKHggMSkKKyAgICAgICh4IDIp KQorICAocHJpbnQgeCkpCitAZW5kIGV4YW1wbGUKKworVGhlcmVmb3JlLCBhdm9pZCBiaW5kaW5n IGEgdmFyaWFibGUgbW9yZSB0aGFuIG9uY2UgaW4gYSBzaW5nbGUKK0Bjb2Rle2xldH0gZm9ybS4K IEBlbmQgZGVmc3BlYwogCiBAZGVmc3BlYyBsZXQqIChiaW5kaW5nc0Bkb3Rze30pIGZvcm1zQGRv dHN7fQpkaWZmIC0tZ2l0IGEvZG9jL21pc2MvY2wudGV4aSBiL2RvYy9taXNjL2NsLnRleGkKaW5k ZXggYzYyZmE3MjdjMS4uYWEwNDdlMjEyMiAxMDA2NDQKLS0tIGEvZG9jL21pc2MvY2wudGV4aQor KysgYi9kb2MvbWlzYy9jbC50ZXhpCkBAIC0xMTc5LDYgKzExNzksMTEgQEAgTW9kaWZ5IE1hY3Jv cwogYXMgQGNvZGV7c2V0Zn0gcGxhY2VzOyBlYWNoIHdpbGwgYWNjZXB0IGVpdGhlciBhbiBpbnRl Z2VyIG9yIGEKIG1hcmtlciBhcyB0aGUgc3RvcmVkIHZhbHVlLikKIAorTGlrZSBpbiB0aGUgY2Fz ZSBvZiBAY29kZXtsZXR9LCB0aGUgQHZhcnt2YWx1ZX0gZm9ybXMgYXJlIGV2YWx1YXRlZCBpbgor dGhlIG9yZGVyIHRoZXkgYXBwZWFyLCBidXQgdGhlIG9yZGVyIG9mIGFzc2lnbm1lbnRzIGlzIHVu c3BlY2lmaWVkLgorVGhlcmVmb3JlLCBhdm9pZCBhc3NpZ25pbmcgdG8gdGhlIHNhbWUgQHZhcntw bGFjZX0gbW9yZSB0aGFuIG9uY2UgaW4gYQorc2luZ2xlIEBjb2Rle2NsLWxldGZ9IGZvcm0uCisK IFNpbmNlIGdlbmVyYWxpemVkIHZhcmlhYmxlcyBsb29rIGxpa2UgbGlzdHMsIEBjb2Rle2xldH0n cyBzaG9ydGhhbmQKIG9mIHVzaW5nIEBzYW1we2Zvb30gZm9yIEBzYW1weyhmb28gbmlsKX0gYXMg YSBAdmFye2JpbmRpbmd9IHdvdWxkCiBiZSBhbWJpZ3VvdXMgaW4gQGNvZGV7Y2wtbGV0Zn0gYW5k IGlzIG5vdCBhbGxvd2VkLgotLSAKMi4xMS4wCgo= --001a11444cc4cdacc805445260fc-- From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order 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 To: Philipp Stephani Cc: Eli Zaretskii , 25154@debbugs.gnu.org, agrambot@gmail.com, tino.calancha@gmail.com Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148249721022103 (code B ref 25154); Fri, 23 Dec 2016 12:47:02 +0000 Received: (at 25154) by debbugs.gnu.org; 23 Dec 2016 12:46:50 +0000 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 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 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) 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) From: Tino Calancha References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> <83r35fg9jq.fsf@gnu.org> Date: Fri, 23 Dec 2016 21:46:39 +0900 In-Reply-To: (Philipp Stephani's message of "Fri, 23 Dec 2016 12:17:54 +0000") Message-ID: <8760ma4xu8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 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 From unknown Thu Jun 19 14:33:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Dec 2016 13:54: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 To: Philipp Stephani Cc: 25154@debbugs.gnu.org, agrambot@gmail.com, tino.calancha@gmail.com Reply-To: Eli Zaretskii Received: via spool by 25154-submit@debbugs.gnu.org id=B25154.148250122228260 (code B ref 25154); Fri, 23 Dec 2016 13:54:02 +0000 Received: (at 25154) by debbugs.gnu.org; 23 Dec 2016 13:53:42 +0000 Received: from localhost ([127.0.0.1]:52148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKQI1-0007Lk-TU for submit@debbugs.gnu.org; Fri, 23 Dec 2016 08:53:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKQI0-0007LT-Ga for 25154@debbugs.gnu.org; Fri, 23 Dec 2016 08:53:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKQHu-0005G4-GC for 25154@debbugs.gnu.org; Fri, 23 Dec 2016 08:53:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKQHq-0005Do-2D; Fri, 23 Dec 2016 08:53:30 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2002 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cKQHp-00080s-1J; Fri, 23 Dec 2016 08:53:29 -0500 Date: Fri, 23 Dec 2016 15:53:05 +0200 Message-Id: <83pokizr9a.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Philipp Stephani on Fri, 23 Dec 2016 12:17:54 +0000) References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> <83r35fg9jq.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.1 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.1 (--------) > From: Philipp Stephani > Date: Fri, 23 Dec 2016 12:17:54 +0000 > Cc: tino.calancha@gmail.com, 25154@debbugs.gnu.org, agrambot@gmail.com > > 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. Thanks. My only comment is that I think we prefer talking about "binding" instead of "assignment". From unknown Thu Jun 19 14:33:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alex Subject: bug#25154: closed (Re: bug#25154: 25.1; Bindings in cl-letf are in reverse order) Message-ID: References: <8737hwllow.fsf@gmail.com> X-Gnu-PR-Message: they-closed 25154 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 25154@debbugs.gnu.org Date: Fri, 23 Dec 2016 16:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1482510722-11721-1" This is a multi-part message in MIME format... ------------=_1482510722-11721-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25154: 25.1; Bindings in cl-letf are in reverse order which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25154@debbugs.gnu.org. --=20 25154: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25154 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1482510722-11721-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25154-done) by debbugs.gnu.org; 23 Dec 2016 16:31:05 +0000 Received: from localhost ([127.0.0.1]:52860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKSkL-00031i-Hd for submit@debbugs.gnu.org; Fri, 23 Dec 2016 11:31:05 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:34496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKSkJ-00031A-Ne for 25154-done@debbugs.gnu.org; Fri, 23 Dec 2016 11:31:04 -0500 Received: by mail-wm0-f47.google.com with SMTP id u144so53710904wmu.1 for <25154-done@debbugs.gnu.org>; Fri, 23 Dec 2016 08:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i+WI1kt8HMcYYmplwCMcQ7q7sI4skaYEEHeS5DWmq2c=; b=c30s/jZaU9G2XTtugH99Sh8fOaujbCTAeU2aKVBk+tIQ/HTJRvZCoHZBGnE3nrSw8v iv7sOwXyAX0N8HeQVkHLQi8ePzqKhKiLK4mjVlZbdfuEfWNw1JQXR2VC4ZSYGUAZOCjj K0s35TLkMxe193kAcXDFpGKx/n+/6/4Fku+IbeMy+yjl6IKel2J3NlWmz+HBb78yaxAI pfMfTb4f6fVXVRvBXDbkqzbNLUDJkdRtYeiyWEQfaayrf/dHs67vEkzqJIDN9hKerejp PfPs+LYoi1ag7xozh5guDHhfNgJzsQD90/HCjFfd+T20eGHoaPN3MT3DShzF3uT7G1l3 wPTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i+WI1kt8HMcYYmplwCMcQ7q7sI4skaYEEHeS5DWmq2c=; b=AHpdbc6JHilfY6IZNYY5uV+TyYToT6FGp4FsFxAgXly/nsx7i8hMt0nsvFWeECC4Vt JC2rJkrbJp88yvDUZbhb+uLL87Dp6SBvO76myCiDuq9cQSVmzAl8Qji3ZwAU8sGNrgfl VSij050U1Pr1bru2fIeK6iXfM+yU1wedPef0KPpxtvx76rXA4nGCksmrS/MQN1JN4ckI O9gDRkuVH0b7o+8vR+IWyCa7TmLbFTc4sz/0kXZkNI7shHCb8aNWm1/wvAACvuYzYXQE 9C6WtxHuijR0tJNlotye9rmSjNouAAYqXRy2CHxBvwp2dPJbE40aesa8NR1MmZgX+ptR c2iQ== X-Gm-Message-State: AIkVDXIbz3FD3S4yPlo4F/Z1qxwewZoDIIC/DA0PjR82kaIKcjRG6OMcQJGij8nSkJHrVI1Sub/FPmTJgTTkuQ== X-Received: by 10.28.87.84 with SMTP id l81mr17268490wmb.48.1482510657897; Fri, 23 Dec 2016 08:30:57 -0800 (PST) MIME-Version: 1.0 References: <8737hwllow.fsf@gmail.com> <83zik4fdug.fsf@gnu.org> <8760msmdq1.fsf@gmail.com> <83r35fg9jq.fsf@gnu.org> <83pokizr9a.fsf@gnu.org> In-Reply-To: <83pokizr9a.fsf@gnu.org> From: Philipp Stephani Date: Fri, 23 Dec 2016 16:30:47 +0000 Message-ID: Subject: Re: bug#25154: 25.1; Bindings in cl-letf are in reverse order To: Eli Zaretskii , 25154-done@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a11444cc423ca50054455e938 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii schrieb am Fr., 23. Dez. 2016 um 14:53 Uhr: > > From: Philipp Stephani > > Date: Fri, 23 Dec 2016 12:17:54 +0000 > > Cc: tino.calancha@gmail.com, 25154@debbugs.gnu.org, agrambot@gmail.com > > > > 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. > > Thanks. My only comment is that I think we prefer talking about > "binding" instead of "assignment". > [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (p.stephani2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (p.stephani2[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.47 listed in list.dnswl.org] 0.0 HTML_MESSAGE BODY: HTML included in message -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.47 listed in wl.mailspike.net] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 25154-done Cc: agrambot@gmail.com, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --001a11444cc423ca50054455e938 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am Fr., 23. Dez. 2016 um 14:53 Uhr: > > From: Philipp Stephani > > Date: Fri, 23 Dec 2016 12:17:54 +0000 > > Cc: tino.calancha@gmail.com, 25154@debbugs.gnu.org, agrambot@gmail.com > > > > 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. > > Thanks. My only comment is that I think we prefer talking about > "binding" instead of "assignment". > OK, replaced "assign" with "bind" and pushed to emacs-25 as c04ac8a3191820d37e7858b7ca4e31cf04808cc3. --001a11444cc423ca50054455e938 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Fr., 23. Dez. 2016 um 14:53=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Fri, 23 Dec 2016 12:17:54 +0000
> Cc: tino.calancha@gmail.com, 25154@debbugs.gnu.org, = agrambot@gmail.com
>
>=C2=A0 I agree, patches to that effect are welcome. (AFAICT, the manual=
>=C2=A0 tries to say that already, but the wording could be more explici= t.)
>
> OK, I've attached a patch that hopefully clarifies this a bit.

Thanks.=C2=A0 My only comment is that I think we prefer talking about
"binding" instead of "assignment".

OK, replaced "assign" with &q= uot;bind" and pushed to emacs-25 as c04ac8a3191820d37e7858b7ca4e31cf04= 808cc3.=C2=A0
--001a11444cc423ca50054455e938-- ------------=_1482510722-11721-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Dec 2016 23:54:34 +0000 Received: from localhost ([127.0.0.1]:36395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFUzq-0003t8-1R for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:54:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFUzo-0003sj-9u for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:54:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFUjg-0008Ge-T5 for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:37:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFUjg-0008GZ-QD for submit@debbugs.gnu.org; Fri, 09 Dec 2016 18:37:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFUjf-0008Us-Hr for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 18:37:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFUja-0008FX-N6 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 18:37:51 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:36378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cFUja-0008DZ-I7 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 18:37:46 -0500 Received: by mail-io0-f193.google.com with SMTP id b194so9912773ioa.3 for ; Fri, 09 Dec 2016 15:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=8KYFlRK8FUk/6cgY/d/gbC1A0ZgNJSQ/pNwBZ0TDrhs=; b=QvAiopiRz9YhKDlgDUnax3E1qSWIxMsMx97kHZ1zrggLp9lMdMxSW/3U3lQdUj7nt+ exveNgYsdXODyEr93mOYoA6B5f+py8qm6H3BEnxDpSpk4DC0vjTgbFSY+T1/k5NPvXQr mGTl1FiMIjVYl2Mv6EZCq84wiEW6+a9ZpL86N37sBweOWqzDf+caTIkLKZ0Vwgrh0Wxt flPkupOnHPBdLoSe+7mfPVAw/6iXQlZi50dp+DOl5BICKtXezHXpyeVEIz1LuCqKqb/e U7bq3+Eo3zhtp/xXftwp5JJaZ/kqNfBVcHBbqKPb1LJsI+nzRUFcuXLdZWMq72SDFHah Ui4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=8KYFlRK8FUk/6cgY/d/gbC1A0ZgNJSQ/pNwBZ0TDrhs=; b=kXSRi4k8rtAEFb/N8G6Gepxq93MHCYvvcKc82X5f7j0ip+phROYdsO302fJhL6mu4d RvDa+g7GoQQ8cim5EwwmKAk8NRD/A+IW4l4KCmZ0QMzPKXSKiZFUVL+k4BHm5mLR1OcN AAqfSgd9cm7iwQq6RQ75TrjAbNCDmC/jC+MvSis5IDo1uoq4/8aALCHk0vLPRjcQVLP8 vu86STVKnmUBELYuP534xNStI+CzqEpxoatcORgAGr+YYdjFsa556v94dOJh6ibnO+Ls 0/h5sbCwAWoNyKFLenpWkFt5t0V8nbPTVKDN9SAf0Vs3rtnt5oCfieHIu5AKquDEq+KH pudg== X-Gm-Message-State: AKaTC00aQiePP3zjKvLVquysaJEzU9uZXfcT5k+O9ffPSFrMbqSSSSqg6zu4OuQolKaXMQ== X-Received: by 10.36.53.69 with SMTP id k66mr9052491ita.18.1481326584288; Fri, 09 Dec 2016 15:36:24 -0800 (PST) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id 2sm15511557ioz.30.2016.12.09.15.36.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Dec 2016 15:36:23 -0800 (PST) From: Alex To: bug-gnu-emacs@gnu.org Subject: 25.1; Bindings in cl-letf are in reverse order Date: Fri, 09 Dec 2016 17:36:15 -0600 Message-ID: <8737hwllow.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Compare the following: (let ((x 5) (x 6)) (+ x 10)) => 16 (cl-letf ((x 5) (x 6)) (+ x 10)) => 15 This also occurs when using non-trivial places: (setq v (vector 1 2 3 4 5)) (cl-letf (((aref v 1) 10) ((aref v 1) 20)) (aref v 1)) => 10 I ran into this when using two different setters that sometimes indirectly modify the same variable. The current behaviour makes the result of that unexpected. ------------=_1482510722-11721-1--