>From f8297c8d43fd8bb4a04fe4fac7d086648cb38f78 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Tue, 11 Oct 2011 20:31:03 -0700 Subject: [PATCH] Call package-refresh-contents in package-install if contents is nil. Currently on the first run M-x package-install will fail. --- lisp/emacs-lisp/package.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 2e340a4..a084d24 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -871,6 +871,8 @@ archive in `package-archives'. Interactively, prompt for NAME." ;; symbols for completion. (unless package--initialized (package-initialize t)) + (unless package-archive-contents + (package-refresh-contents)) (list (intern (completing-read "Install package: " (mapcar (lambda (elt) -- 1.7.4.1