[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master add49b6: * lisp/emacs-lisp/package.el: Reduce a
Re: [Emacs-diffs] master add49b6: * lisp/emacs-lisp/package.el: Reduce autoloading before compiling
Tue, 8 Sep 2015 02:59:20 +0100
package-activate-1 was being called twice during installation. Once
before compilation and once after.
IIUC, there are only two things in package-activate-1 that affect
byte-compilation: setting the load-path and loading the autoloads
file. So I refactored those two functionalities into
Now, instead of calling `package-activate-1' before compilation, we
call this new simpler function.
`package-activate-1' is still called after compilation, and it's
functionality has not changed (it still sets the load-path and loads
autoloads by calling this new function, in addition to the other stuff
that it does).
1) `package-activate-1' has a couple of line that shouldn't be called
twice, like (push name package-activated-list) and (push pkg-dir
Info-directory-list). It wasn't the end of the world, but it was wrong
(again, IIUC) and it could get worse if we extend this function in the
2) It's just confusing to see a package being activated twice
throughout a single installation. I find it more informative to do
specifically what we want (i.e., load autloads and set load-path
3) The name package-activate-1 gives the impression that it's an
implementation function for package-activate, which made it confusing
that it was being called outside package-activate.
2015-09-08 2:33 GMT+01:00 Stefan Monnier <address@hidden>:
>> (package--activate-autoloads-and-load-path): New function.
>> (package-activate-1): Delegate autoloading and load-path
>> configuration to `package--activate-autoloads-and-load-path'.
>> (package--compile): Before compilation, call
>> `package--activate-autoloads-and-load-path' instead of
> Not sure I follow what this is doing, nor why. Can you explain?