From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Definition reasoning of revert-buffer-function, should it be defvar-local? Date: Tue, 10 Aug 2021 16:46:47 +0200 Message-ID: <875ywdmk00.fsf@gnu.org> References: <874kbxwgmu.fsf@posteo.de> <87czql8j2l.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30396"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.2; emacs 28.0.50 Cc: emacs-devel@gnu.org, Daniel Nagy To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 10 16:56:18 2021 Return-path: Envelope-to: ged-emacs-devel@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 ) id 1mDTAs-0007WY-BX for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Aug 2021 16:56:14 +0200 Original-Received: from localhost ([::1]:41866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDTAr-0006Ki-1V for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Aug 2021 10:56:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDT5Z-0003FZ-1R for emacs-devel@gnu.org; Tue, 10 Aug 2021 10:50:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52076) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDT5Y-0006Lw-2Y; Tue, 10 Aug 2021 10:50:44 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:53471) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDT5X-0005nT-VF; Tue, 10 Aug 2021 10:50:43 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 7A50027C0054; Tue, 10 Aug 2021 10:50:43 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 10 Aug 2021 10:50:43 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeelgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpeevve eikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleek qdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Aug 2021 10:50:41 -0400 (EDT) In-reply-to: <87czql8j2l.fsf@igel.home> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272283 Archived-At: Andreas Schwab writes: >> I want to understand the reasoning behind the definition and the >> intention of the variable `revert-buffer-function`. >> >> In `files.el` I see the following definition: >> >>> (put 'revert-buffer-function 'permanent-local t) >>> (defvar revert-buffer-function #'revert-buffer--default) >> >> The first line suggests to me, that the intention of the variable is that it is >> supposed to be buffer-local, but `defvar-local` was not used. > > When these lines were written, defvar-local didn't exist. Hehe, sure. But why hasn't `make-variable-buffer-local' been used? I agree with Daniel that nobody should ever alter the global value of `revert-buffer-function' but it is easy to do that accidentally. Bye, Tassilo