bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63807: bug in compose-gstring-for-terminal?


From: Mattias Engdegård
Subject: bug#63807: bug in compose-gstring-for-terminal?
Date: Wed, 31 May 2023 17:08:58 +0200

31 maj 2023 kl. 16.30 skrev Eli Zaretskii <eliz@gnu.org>:

> If we agree that replacing (+ 2) with (+ i 2) is "completely safe",
> then we basically agree that this code runs only when i == zero,
> right?

Yes -- that is, if we trust external invariants to enforce that it indeed only 
runs when i is 0. Otherwise, the current code is incorrect and changing it 
would fix a bug. Either way, changing it should do no harm and has the 
possibility of improving correctness.

I was unable to provoke that particular code to run for strings longer than 1 
chars but that could just be my own ineptitude, and in any case it seems unsafe 
to rely on it. Maybe you could come up with an example?

(And to answer your question that I edited out in haste: there are no plans to 
warn about unary applications of `+`. This was just something I stumbled upon 
while researching something else.)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]