kotct / dot

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

fix: #144 initialize package iff <27.1 #145

Closed samontea closed 4 years ago

samontea commented 4 years ago

This is to fix a warning introduced in emacs 27.1.

EDITs by @rye: Closes #144. Closes #123.

rye commented 4 years ago

I have edited the OP to include closes statements for #144 and also #123 which is basically the same issue.

It may also be worth noting that package-initialize is not really necessary anymore:

Installed packages are now activated before loading the init file. As a result of this change, it is no longer necessary to call 'package-initialize' in your init file.

So it may be worth locking our initialization behind a version gate as well:

(when (version< emacs-version "27.1")
  (package-initialize))

I'm… pretty sure that if we package-initialize in that way in our init file, the other package-initialize calls can be safely removed.

samontea commented 4 years ago

I'd prefer to use the variable package--intialized because even independent of these changes multiple package-initialize calls are unadvisable.

samontea commented 4 years ago

haha jk. I switched to version checking. package--intialized didn't do what I wanted it to.