From: Stefan Monnier Date: Thu, 25 Oct 2012 12:38:09 +0000 (-0400) Subject: * lisp/emacs-lisp/package.el (package-installed-p): Warn if not ready. X-Git-Tag: emacs-24.2.90~209^2~75 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a7723be6dd55da926ade554df4f4fab86c094835;p=emacs.git * lisp/emacs-lisp/package.el (package-installed-p): Warn if not ready. Fixes: debbugs:12721 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1150b68fe0f..bb19e10b9ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-10-25 Stefan Monnier + + * emacs-lisp/package.el (package-installed-p): Warn if not ready + (bug#12721). + 2012-10-25 Glenn Morris * emacs-lisp/cl-macs.el (cl-progv): Doc fix. 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