GNU bug report logs - #57003
28.1.90; Can local variables be loaded before loading major mode?

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> gmail.com>

Date: Fri, 5 Aug 2022 11:44:02 UTC

Severity: wishlist

Found in version 28.1.90

Full log


Message #87 received at 57003 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: larsi <at> gnus.org, 57003 <at> debbugs.gnu.org
Subject: Re: bug#57003: 28.1.90; Can local variables be loaded before
 loading major mode?
Date: Sun, 28 Aug 2022 23:34:45 -0400
[[[ 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)






This bug report was last modified 1 year and 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.