get rid of infinite loop in package install error handling.

This commit is contained in:
Ivan Malison 2014-11-05 10:34:47 -08:00
parent da7b0d5266
commit d0d842e62c

23
init.el
View File

@ -53,16 +53,16 @@
(defvar packages-js '(js2-mode js3-mode web-beautify tern tern-auto-complete))
(defun ensure-packages-installed (packages)
(condition-case ex
(dolist (p packages)
(when (not (package-installed-p p))
(package-install p)))
('error (package-refresh-contents)
(ensure-packages-installed packages) nil)))
(dolist (p packages)
(when (not (package-installed-p p))
(package-install p))))
(ensure-packages-installed
(append packages-essential packages-python packages-scala packages-js
packages-appearance packages-other))
(let ((packages (append packages-essential packages-python packages-scala packages-js
packages-appearance packages-other)))
(condition-case ex
(ensure-packages-installed packages)
('error (package-refresh-contents)
(ensure-packages-installed packages) nil)))
;; =============================================================================
;; Disables
@ -224,6 +224,11 @@
(require 'tern-auto-complete)
(tern-ac-setup)))
(add-hook 'css-mode-hook
(lambda ()
(define-key css-mode-map "\M-\C-x" 'slime-js-refresh-css)
(define-key css-mode-map "\C-c\C-r" 'slime-js-embed-css)))
;; =============================================================================
;; C/C++
;; =============================================================================