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

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

bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked


From: Eli Zaretskii
Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing.
Date: Wed, 15 Feb 2023 14:36:07 +0200

> Date: Tue, 14 Feb 2023 22:50:24 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca, akrl@sdf.org
> 
> >> Fwiden in the functions above (which are AFAICS the only places in 
> >> Emacs where Fwiden is called) is not prepared to the possibility of 
> >> them being called inside a labeled narrowing, either one installed by 
> >> the long lines code, or another one.  Basically we need to use a 
> >> variant of reset_outermost_narrowings (for the current buffer only) 
> >> where we use
> >>
> >> record_unwind_protect (save_restriction_restore, save_restriction_save ());
> >
> > Ah, okay.  Please do, and thanks.
> >
> 
> And here's the patch!

Hmm... I'm probably missing something, but doesn't
narrowing_locks_remove permanently removes the lock from the
restriction in the buffer?  And if so, don't we want to restore the
lock after whatever we need to do in a widened buffer is done?  For
example, for displaying line numbers, we don't want to modify anything
in the locked restrictions just because we need to calculate a line
number.





reply via email to

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