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

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

bug#56393: Actually fix the long lines display bug


From: Eli Zaretskii
Subject: bug#56393: Actually fix the long lines display bug
Date: Sat, 09 Jul 2022 12:30:05 +0300

> Cc: gerd.moellmann@gmail.com, larsi@gnus.org, 56393@debbugs.gnu.org
> Date: Sat, 09 Jul 2022 12:20:38 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > > . 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.





reply via email to

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