kotct / dot

A collaborative configuration for various tools.
MIT License
3 stars 2 forks source link

Symbol's function definition is void: package-initialize #123

Closed rye closed 4 years ago

rye commented 6 years ago

I have gotten the following warning since switching back to Emacs' development version.

Warning (package): Unnecessary call to ‘package-initialize’ in init file

It seems that our call of this is unnecessary.

The reason automatic package loading occurs after loading the init file is that user options only receive their customized values after loading the init file, including user options which affect the packaging system. In some circumstances, you may want to load packages explicitly in your init file (usually because some other code in your init file depends on a package). In that case, your init file should call the function package-initialize. It is up to you to ensure that relevant user options, such as package-load-list, are set up prior to the package-initialize call. This will automatically set package-enable-at-startup to nil, to avoid loading the packages again after processing the init file. Alternatively, you may choose to completely inhibit package loading at startup, and invoke the command M-x package-initialize to load your packages manually.

Given that we require any dependencies that we need to configure before configuring them, do we still need this call? Emacs is saying no.

https://github.com/kotct/dot/blob/61b9eb5833b5f31bddfc176ffead20d29c256497/.emacs.d/init.el#L6-L7

rye commented 4 years ago

In fact, now package-initialize is not even a valid symbol when we call it, anyhow!

Symbol's function definition is void: package-initialize

Process config-compilation exited abnormally with code 255