branch: elpa/magit
commit be8f9bac84141124cb5be7eb5e31cac7fcdeaae2
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
No longer require package
The idea was to only ask `package' about what Magit version it
installed when it is actually being used to manage packages.
Loading it unconditionally goes counter to those intentions.
Also, `straight' makes noise if it notices that `package' has
been loaded as well.
Closes #5443.
Closes #5445.
---
lisp/magit.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/magit.el b/lisp/magit.el
index a4773f5373f..ac430297dc3 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -71,7 +71,6 @@
(require 'epa) ;used in magit-read-gpg-{secret,signing}-key
(require 'format-spec)
-(require 'package nil t) ; used in `magit-version'
(require 'with-editor)
;;; Options
@@ -634,7 +633,9 @@ the output in the kill ring.
(push t debug)
(load-file static)
magit-version))
- (when (featurep 'package)
+ (when (and (featurep 'package)
+ (boundp 'package-alist)
+ (fboundp 'package-version-join))
(push 'elpa debug)
(ignore-errors
(when-let ((version (cadr (assq 'magit package-alist))))