summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 28d166271fb..303642b5bec 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -728,6 +728,7 @@ It will move point to somewhere in the headers."
(defun package-installed-p (package &optional min-version)
"Return true if PACKAGE, of MIN-VERSION or newer, is installed.
MIN-VERSION should be a version list."
+ (unless package--initialized (error "package.el is not yet initialized!"))
(let ((pkg-desc (assq package package-alist)))
(if pkg-desc
(version-list-<= min-version