diff options
| author | Phil Hagelberg | 2012-01-28 17:49:29 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-01-28 17:49:29 +0800 |
| commit | 70550acf88e5d7083d3aa83d201a8a7ebc3ba4b6 (patch) | |
| tree | b75054d97335a37fa8b86ca9106a6d3a9f65d3cf | |
| parent | 0ce8e868b9c704f5f8630e0b8df5550ecadb0e95 (diff) | |
| download | emacs-70550acf88e5d7083d3aa83d201a8a7ebc3ba4b6.tar.gz emacs-70550acf88e5d7083d3aa83d201a8a7ebc3ba4b6.zip | |
Fix M-x package-install failure if no archive has been fetched yet.
* emacs-lisp/package.el (package-install): Run
package-refresh-contents if there is no archive yet.
Fixes: debbugs:97978
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 887959d2fe0..896f7ce9a97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-01-28 Phil Hagelberg <phil@hagelb.org> | ||
| 2 | |||
| 3 | * emacs-lisp/package.el (package-install): Run | ||
| 4 | package-refresh-contents if there is no archive yet (Bug#97978). | ||
| 5 | |||
| 1 | 2012-01-28 Chong Yidong <cyd@gnu.org> | 6 | 2012-01-28 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/package.el (package-maybe-load-descriptor): New | 8 | * emacs-lisp/package.el (package-maybe-load-descriptor): New |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7e56c5534ec..317fa1fd23d 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -889,6 +889,8 @@ archive in `package-archives'. Interactively, prompt for NAME." | |||
| 889 | ;; symbols for completion. | 889 | ;; symbols for completion. |
| 890 | (unless package--initialized | 890 | (unless package--initialized |
| 891 | (package-initialize t)) | 891 | (package-initialize t)) |
| 892 | (unless package-archive-contents | ||
| 893 | (package-refresh-contents)) | ||
| 892 | (list (intern (completing-read | 894 | (list (intern (completing-read |
| 893 | "Install package: " | 895 | "Install package: " |
| 894 | (mapcar (lambda (elt) | 896 | (mapcar (lambda (elt) |