GNU bug report logs - #67116
byte-compile-let: reversing the order of evaluation of the clauses CAN make a difference.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sat, 11 Nov 2023 22:50:01 UTC

Severity: normal

Done: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 67116 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#67116: byte-compile-let: reversing the order of evaluation of the clauses CAN make a difference
Date: Sun, 12 Nov 2023 15:21:32 +0100
>                           (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.  Since the value for END contains (setq
> pos ...), BEG gets this updated value of POS rather then the original
> intended value.

No, the generated code looks correct. Do you have any reason to believe it's not?

(Of course I always blame the compiler first. It's programmer tradition!)





This bug report was last modified 1 year and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.