From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: bug#57003: 28.1.90; Can local variables be loaded before loading major mode? Date: Sun, 28 Aug 2022 23:34:45 -0400 Message-ID: References: <87czdeoqy7.fsf@localhost> <87v8r54j3h.fsf@gnus.org> <875yj5xzou.fsf@localhost> <875yj443zy.fsf@gnus.org> <874jyo6vd6.fsf@localhost> <87k07k18ro.fsf@gnus.org> <871qts6tzy.fsf@localhost> <87bksv0ya6.fsf@gnus.org> <87edxqzzm6.fsf@localhost> <87leryzzdl.fsf@gnus.org> <87a68ezycj.fsf@localhost> <875yj2zudw.fsf@gnus.org> <871qtp64eq.fsf@localhost> <878rntskld.fsf@gnus.org> <877d3c7by7.fsf@localhost> <87h72gjr3a.fsf@gnus.org> <87ilmw5o4j.fsf@localhost> <87k07ayz7u.fsf@localhost> <87wnb7yyfb.fsf@localhost> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14822"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 57003@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 29 05:35:17 2022 Return-path: Envelope-to: geb-bug-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 ) id 1oSVYS-0003fV-Ul for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 05:35:17 +0200 Original-Received: from localhost ([::1]:49006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSVYR-0005Pf-Cv for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Aug 2022 23:35:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSVYF-0005PJ-Ga for bug-gnu-emacs@gnu.org; Sun, 28 Aug 2022 23:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSVYF-00052Y-0l for bug-gnu-emacs@gnu.org; Sun, 28 Aug 2022 23:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSVYE-0007tG-Gp for bug-gnu-emacs@gnu.org; Sun, 28 Aug 2022 23:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Aug 2022 03:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57003 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57003-submit@debbugs.gnu.org id=B57003.166174409330301 (code B ref 57003); Mon, 29 Aug 2022 03:35:02 +0000 Original-Received: (at 57003) by debbugs.gnu.org; 29 Aug 2022 03:34:53 +0000 Original-Received: from localhost ([127.0.0.1]:59843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSVY5-0007se-Dc for submit@debbugs.gnu.org; Sun, 28 Aug 2022 23:34:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSVY3-0007sK-CZ for 57003@debbugs.gnu.org; Sun, 28 Aug 2022 23:34:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57222) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSVXy-0004wi-1E; Sun, 28 Aug 2022 23:34:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=RxmqoRi+T1eZMXRgFuu0g9x4/6Wm4QGmMIRCMQtPNd0=; b=eSiEdN7uLRVj 49c3p7l9uVMU+nPYHlnk6Xa3gil2dxlVzh8mQjknXkA7M3jYfZ2Gop4FBgWtxWpgYZQFnws8aJUaJ F6ajOxNzy7vxS+4tj43ZShN9BO9FRS9RRfmMBmcx2KNLOVHzhjp37oN2fvS0id9lIuxRkQkGQ3RBG Sh3iUa9RR7xSz3hvr+CVKY884M6YeLJfDAOkwnvcXPgEfDXd10EnQlexpPldMah/QasMH9Dwf2xQk H2+bDm4/YNOdcoDyjgfggrTirN1uHWevnYb+lPx+Z8oDoVS9nzTKb7mqedVsffmspMvK40PRivE2Y OR2whvbCDV9w8QgC61udJw==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1oSVXx-0008BG-HH; Sun, 28 Aug 2022 23:34:45 -0400 In-Reply-To: <87wnb7yyfb.fsf@localhost> (message from Ihor Radchenko on Wed, 17 Aug 2022 18:08:56 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240999 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > 'early-local will apply file/directory-local variables _before_ executing > > > the major-mode body. In contrast, the variables without this property > > > are applied _after_ executing the major-mode body. > > > > I suppose you'll do something to protect those local variables from > > `kill-all-local-variables' so it won't kill them. > No. Not killing the _already existing_ local variables is what > 'persistent-local is for. What I am proposing here is only relevant to > buffer-local and directory-local variables that are going to be loaded > anyway. The change will only affect _when_ they are loaded. That's the right thing to do. However, your previous message seemed to imply a problem, because it proposed loading these buffer-local variables "before executing the major mode body", and that would be before `kill-all-local-variables'. That function would kill these new bindings, unless it were prevented from doing so. Now I think that was just my misundersanding. So I am relieved. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)