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

17
init.el
View File

@ -53,17 +53,17 @@
(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)))
(package-install p))))
(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)))
(ensure-packages-installed
(append packages-essential packages-python packages-scala packages-js
packages-appearance packages-other))
;; =============================================================================
;; 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++
;; =============================================================================