[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67116: byte-compile-let: reversing the order of evaluation of the cl
From: |
Eli Zaretskii |
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 |
> 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" <bug-gnu-emacs@gnu.org>
>
> > 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??
bug#67116: byte-compile-let: reversing the order of evaluation of the clauses CAN make a difference, Mattias Engdegård, 2023/11/12