emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading a package applies automatically to future sessions?


From: Richard Stallman
Subject: Re: Loading a package applies automatically to future sessions?
Date: Sat, 03 Feb 2018 22:08:43 -0500

[[[ 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. ]]]

  > There may be a misunderstanding.  Emacs already works in (mostly) the same 
way: Emacs' `require' is very close to Python's `import'.

That's the behavior I'd expect a feature like this to have.

  > * Emacs has autoloads, small pieces of code from packages that are run 
inconditionally.

I do know about autoloads; I implemented them.
The questions are (1) do a lot of these packages have autoloads, or just
a few, and (2) when do the autoloads get installed into Emacs.

If adding a package to the list for loading has the effect of installing
its autploads in all future sessions, that results in behavior very
different from the 'require' behavior, and behavior that doesn't match
what I'd expect such a feature to have.

Does Python have autoloads?  I would expect not.

  > * `require' works globally in Emacs, so once package foo is
  > * `require'd in one file, all subsequently executed code can call
  > * foo-x, without calling (require 'foo) again.

That is true.  With dynamic scoping that was basically inevitable.

However, when lexical scoping becomes the default, it might be
possible to arrange that a Lisp library is in scope only in files that
require it.  That would clean up a lot of things.  For instance,
it would not matter whether you compile A before B or after B.

Since the effect of calling an autoload function is to call 'require',
it could be that lexical handling of 'require' will automatically
clean up the way these autoloads are handled.


-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Skype: No way! See https://stallman.org/skype.html.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]