Subject: Re: bug#56393: Actually fix the long lines display bug

From: Eli Zaretskii <[email-masked]>
Date: Sat, 09 Jul 2022 12:30:05 +0300

> Cc: [email-masked], [email-masked], [email-masked]
> Date: Sat, 09 Jul 2022 12:20:38 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > > . The WITH_NARROWED_BEGV macro is IMO awkward and not very convenient to 
> > > use in C.  For starters, it cannot accommodate multi-line code, except 
> > > via the 'do { ... } while(0);' kludge, which I think will make the code 
> > > less readable.  It also should set up an unwind-protect handler, so that 
> > > any non-local exit from the code will restore BEGV/ZV.  So I think it 
> > > will be better to have two separate functions (and a third one to 
> > > unwind).
> > >
> > 
> > Hmmm...  I'll see what I can do.  (But I don't understand why you write 
> > that it cannot accomodate multi-line code: you can write 
> > "WITH_NARROWED_BEGV (frobnicate (foo); frobnicate (bar));".)
> 
> What if the multi-line code includes an if clause or a for loop with
> just one line in their bodies?

This also requires to remember NOT to use a semi-colon at the end of
the last line, which is problematic.