From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67116: byte-compile-let: reversing the order of evaluation of the clauses CAN make a difference. Date: Sun, 12 Nov 2023 08:13:39 +0200 Message-ID: <83r0kvv6r0.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40894"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67116@debbugs.gnu.org, acm@muc.de To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 12 07:14:35 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r23ju-000ASJ-Un for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Nov 2023 07:14:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r23jk-0008Ee-8y; Sun, 12 Nov 2023 01:14:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r23ji-0008EW-A4 for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 01:14:22 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r23ji-0001t4-2C for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 01:14:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r23kM-0005Eq-Cw for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 01:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Nov 2023 06:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67116 X-GNU-PR-Package: emacs Original-Received: via spool by 67116-submit@debbugs.gnu.org id=B67116.169976968820104 (code B ref 67116); Sun, 12 Nov 2023 06:15:02 +0000 Original-Received: (at 67116) by debbugs.gnu.org; 12 Nov 2023 06:14:48 +0000 Original-Received: from localhost ([127.0.0.1]:54964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r23k7-0005EB-SB for submit@debbugs.gnu.org; Sun, 12 Nov 2023 01:14:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r23k5-0005Dx-PF for 67116@debbugs.gnu.org; Sun, 12 Nov 2023 01:14:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r23jK-0001rB-O6; Sun, 12 Nov 2023 01:13:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jcQmJOL4I4+87rxUsVvIWvVWOZVGl4z9USszzkDrmuY=; b=D0tVA29iYVtU +F3J92J1zVmcUm7orMyXytsP/XgWikjjtZ+MawXidiiKkooJX06dpqRTyVE8cjd1ECCU7LXjK1y2x VYnYdwBnw95yIXTZ8+YjAdZEH6vvfV8xTXjjIBzPVEhgbRopm0eSv1dG4lXQFDHiJ7Y3ms6YTCcW2 jTeBHzxu6YQu/zvyqJK1RBQ25lZBJ4t/mucdwvQjXpb0e6rphBQdjbOUdXRV+56yXLK+H3pg2m9vx XQmKjoy3OHHu00Y9dmU4ddjSt4smZTznz2qaRC0pwmQ8bdM89LJrKOAE+OeyNvt7C7LD4D8BMvmSN M8iw9qNWWAWcFlVoH5F1mg==; In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274187 Archived-At: > Cc: 67116@debbugs.gnu.org > Date: Sat, 11 Nov 2023 23:52:38 -0500 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > In lisp/emacs-lisp/bytecomp.el (byte-compile-let), when the following > > form (from jit-lock--debug-fontify): > > > > (let > > ((beg pos) > > (end (setq pos > > (next-single-property-change > > pos 'fontified > > nil (point-max))))) > > (put-text-property beg end 'fontified nil) > > (jit-lock-fontify-now beg end)) > > > > gets byte compiled, the order of evaluating BEG and END gets reversed so > > that END gets evaluated first. > > Sounds like a bug. It does? I always thought that the order of evaluation in a let form is unspecified, and in practice I had several bugs of exactly this nature, which I fixed by using let*, as expected. Why on Earth should we require any particular order of evaluation in a let form??