Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #657 from DarwinAwardWinner/code-cleanup

Simplify "el-get-install" and other fixes
  • Loading branch information...
commit 2f3097a6fb2638bfc4a022244f8dad55633f53f0 2 parents 4b86f11 + c786602
@DarwinAwardWinner DarwinAwardWinner authored
Showing with 9 additions and 16 deletions.
  1. +9 −16 el-get.el
View
25 el-get.el
@@ -535,20 +535,11 @@ dependencies (if any).
PACKAGE may be either a string or the corresponding symbol."
(interactive (list (el-get-read-package-name "Install")))
- (let ((packages (el-get-dependencies (el-get-as-symbol package))))
- (when (cdr packages)
- ;; tweak el-get-post-install-hooks to install remaining packages
- ;; once the first is installed
- (el-get-verbose-message "el-get-install %s: %S" package packages)
- (setq el-get-next-packages (cdr packages))
- (add-hook 'el-get-post-init-hooks 'el-get-install-next-packages))
-
- (let ((package (car packages)))
- (if (not (el-get-package-is-installed package))
- (el-get-do-install package)
- ;; if package is already installed, skip to the next
- (message "el-get: `%s' package is already installed" package)
- (el-get-init package)))))
+ (setq el-get-next-packages (el-get-dependencies (el-get-as-symbol package)))
+ (el-get-verbose-message "el-get-install %s: %S" package el-get-next-packages)
+ (add-hook 'el-get-post-init-hooks 'el-get-install-next-packages)
+ ;; Start the chain of dependency installation
+ (el-get-install-next-packages))
(defun el-get-install-next-packages (&rest ignored)
"Run as part of `el-get-post-init-hooks' when dealing with dependencies."
@@ -604,7 +595,9 @@ PACKAGE may be either a string or the corresponding symbol."
"Install any PACKAGE for which you have a recipe."
(el-get-error-unless-package-p package)
(if (el-get-package-is-installed package)
- (el-get-init package)
+ (progn
+ (el-get-verbose-message "el-get: `%s' package is already installed" package)
+ (el-get-init package))
(let* ((status (el-get-read-package-status package))
(source (el-get-package-def package))
(method (el-get-package-method source))
@@ -632,7 +625,7 @@ PACKAGE may be either a string or the corresponding symbol."
(defun el-get-reload (package)
"Reload PACKAGE."
(interactive
- (list (el-get-read-package-with-status "Update" "installed")))
+ (list (el-get-read-package-with-status "Reload" "installed")))
(el-get-verbose-message "el-get-reload: %s" package)
(el-get-with-status-sources
(let* ((all-features features)
Please sign in to comment.
Something went wrong with that request. Please try again.