From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.help
Subject: Re: What should I use to unrestrict a buffer?
Date: Thu, 25 Jan 2024 09:14:26 +0200
Message-ID: <86r0i5dgvh.fsf@gnu.org>
References: <4df85194384c642c3cda3289cd1ac1a20ee42bcc.camel@adminart.net>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="25907"; mail-complaints-to="usenet@ciao.gmane.io"
To: help-gnu-emacs@gnu.org
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 25 08:15:22 2024
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1rStxI-0006Wx-RV
	for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 25 Jan 2024 08:15:21 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <help-gnu-emacs-bounces@gnu.org>)
	id 1rStwa-0000wj-2e; Thu, 25 Jan 2024 02:14:36 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>) id 1rStwW-0000vU-4R
 for help-gnu-emacs@gnu.org; Thu, 25 Jan 2024 02:14:32 -0500
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>) id 1rStwV-0003KR-R6
 for help-gnu-emacs@gnu.org; Thu, 25 Jan 2024 02:14:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=HrOU+1qTPqu054NoBkCXW3FNNhM1bddlA4TBkGLy4Hw=; b=lyfMJ9+2KjPN
 03Nzu3Xc8qbJr1P1n6rF/UA00TpaHNT/4G0aRvufWBgbJGJ25lZbKT5kVXYS47VzlQodjGVoU59xa
 uqRPyPffzwNpCCXknuxxLLQeP4ZMP/RY6BqCxxuAxJAWa+C1X1Lt3QE8ctD2giaCLGZKQ9G86ahz2
 zaUaVSvJk115m6r0RViXRBwSXH15vQrJX6ocalvjQ5gA0OrrHR3fyJyZoAFm6edQuDa/6doBMRwIe
 KDCK5kRFLkfQKbxi+/vVmSKxpWi4giqxLRFghORXZ7wevPhJHtrX6LHaLu5zkdI6pMAlR2ZX8plTw
 4oifsY0Gf2YjejIdp84N4A==;
In-Reply-To: <4df85194384c642c3cda3289cd1ac1a20ee42bcc.camel@adminart.net>
 (message from hw on Wed, 24 Jan 2024 21:12:56 +0100)
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.help:145800
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/145800>

> From: hw <hw@adminart.net>
> Date: Wed, 24 Jan 2024 21:12:56 +0100
> 
> Also, I don't want possible restrictions to be restored, like
> (without-restriction) would do.

Why not?  After you do whatever you need to do with the widened
buffer, you are supposed to return the restrictions to their previous
state, and that includes restoring the restrictions present before the
widening.  Why would you need to avoid restoring them, and thus change
the restrictions behind some other Lisp program which doesn't expect
its restrictions to be lifted?