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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 15 Feb 2023 16:10:00 +0200

> Date: Wed, 15 Feb 2023 13:37:46 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked], [email-masked], [email-masked]
> 
> > 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?
> 
> Yes: that's what the "record_unwind_protect (save_restriction_restore, 
> save_restriction_save ());" does.

So save_restriction_restore will reinstate the buffer in the
narrowing_locks list?

> The two places where 'narrowing_locks_remove_in_current_buffer' is
> not preceded by that statement are the two places where we indeed
> don't want to restore the restrictions after widening: Ferase_buffer
> and Fcall_process_region.

OK.