Merge branch 'npostavs-package-initialize' into next

This commit is contained in:
Yakkala Yagnesh Raghava 2013-10-07 10:57:56 +09:00
commit 513a1a7125
2 changed files with 9 additions and 9 deletions

View File

@ -101,16 +101,15 @@ the recipe, then return nil."
(package-archives (append (when elpa-repo (list elpa-repo))
(when (boundp 'package-archives) package-archives))))
(unless (and elpa-dir (file-directory-p elpa-dir))
;; Make sure we have got *some* kind of record of the package archive.
;; package-install does these only for interactive calls
(unless package--initialized
(package-initialize t))
(unless package-archive-contents
(package-refresh-contents))
;; TODO: should we refresh and retry once if package-install fails?
(let ((p (if (fboundp 'package-read-all-archive-contents)
(package-read-all-archive-contents) ; version from emacs24
(package-read-archive-contents))) ; old version
;; package-install generates autoloads, byte compiles
emacs-lisp-mode-hook fundamental-mode-hook prog-mode-hook)
(unless p
(package-refresh-contents)))
(package-install (el-get-as-symbol package)))
;; package-install generates autoloads, byte compiles
(let (emacs-lisp-mode-hook fundamental-mode-hook prog-mode-hook)
(package-install (el-get-as-symbol package))))
;; we symlink even when the package already is installed because it's
;; not an error to have installed ELPA packages before using el-get, and
;; that will register them

View File

@ -0,0 +1 @@
(el-get 'sync 'ido-ubiquitous)