get rid of infinite loop in package install error handling.
This commit is contained in:
parent
da7b0d5266
commit
d0d842e62c
23
init.el
23
init.el
@ -53,16 +53,16 @@
|
|||||||
(defvar packages-js '(js2-mode js3-mode web-beautify tern tern-auto-complete))
|
(defvar packages-js '(js2-mode js3-mode web-beautify tern tern-auto-complete))
|
||||||
|
|
||||||
(defun ensure-packages-installed (packages)
|
(defun ensure-packages-installed (packages)
|
||||||
(condition-case ex
|
(dolist (p packages)
|
||||||
(dolist (p packages)
|
(when (not (package-installed-p p))
|
||||||
(when (not (package-installed-p p))
|
(package-install p))))
|
||||||
(package-install p)))
|
|
||||||
('error (package-refresh-contents)
|
|
||||||
(ensure-packages-installed packages) nil)))
|
|
||||||
|
|
||||||
(ensure-packages-installed
|
(let ((packages (append packages-essential packages-python packages-scala packages-js
|
||||||
(append packages-essential packages-python packages-scala packages-js
|
packages-appearance packages-other)))
|
||||||
packages-appearance packages-other))
|
(condition-case ex
|
||||||
|
(ensure-packages-installed packages)
|
||||||
|
('error (package-refresh-contents)
|
||||||
|
(ensure-packages-installed packages) nil)))
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; Disables
|
;; Disables
|
||||||
@ -224,6 +224,11 @@
|
|||||||
(require 'tern-auto-complete)
|
(require 'tern-auto-complete)
|
||||||
(tern-ac-setup)))
|
(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++
|
;; C/C++
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user