core: fix SPC f e R after layer system refactoring

Correctly adds packages when resync the dofile. Also flush the layer
index before rediscovering the layers.
This commit is contained in:
syl20bnr 2016-07-29 00:00:55 -04:00
parent 0a01159572
commit 9c3802b142

View file

@ -797,8 +797,8 @@ variable as well."
(obj (configuration-layer/get-package pkg-name))) (obj (configuration-layer/get-package pkg-name)))
(if obj (if obj
(setq obj (configuration-layer/make-package pkg obj ownerp layer)) (setq obj (configuration-layer/make-package pkg obj ownerp layer))
(setq obj (configuration-layer/make-package pkg nil ownerp layer)) (setq obj (configuration-layer/make-package pkg nil ownerp layer)))
(configuration-layer//add-package obj usedp)) (configuration-layer//add-package obj usedp)
(when ownerp (when ownerp
;; last owner wins over the previous one, ;; last owner wins over the previous one,
;; still warn about mutliple owners ;; still warn about mutliple owners
@ -845,13 +845,13 @@ variable as well."
(if obj (if obj
(setq obj (configuration-layer/make-package pkg obj t)) (setq obj (configuration-layer/make-package pkg obj t))
(setq obj (configuration-layer/make-package pkg nil t)) (setq obj (configuration-layer/make-package pkg nil t))
(configuration-layer//add-package obj usedp) (push 'dotfile (oref obj :owners)))
(push 'dotfile (oref obj :owners))))) (configuration-layer//add-package obj usedp)))
(dolist (xpkg dotspacemacs-excluded-packages) (dolist (xpkg dotspacemacs-excluded-packages)
(let ((obj (configuration-layer/get-package xpkg))) (let ((obj (configuration-layer/get-package xpkg)))
(unless obj (unless obj
(setq obj (configuration-layer/make-package xpkg)) (setq obj (configuration-layer/make-package xpkg)))
(configuration-layer//add-package obj usedp)) (configuration-layer//add-package obj usedp)
(oset obj :excluded t))))) (oset obj :excluded t)))))
(defun configuration-layer/lazy-install (layer-name &rest props) (defun configuration-layer/lazy-install (layer-name &rest props)
@ -984,6 +984,7 @@ Returns nil if the directory is not a category."
;; load private layers at the end on purpose we asume that the user layers ;; load private layers at the end on purpose we asume that the user layers
;; must have the final word on configuration choices. Let ;; must have the final word on configuration choices. Let
;; `dotspacemacs-directory' override the private directory if it exists. ;; `dotspacemacs-directory' override the private directory if it exists.
(setq configuration-layer--indexed-layers (make-hash-table :size 1024))
(let ((search-paths (append (list configuration-layer-directory) (let ((search-paths (append (list configuration-layer-directory)
dotspacemacs-configuration-layer-path dotspacemacs-configuration-layer-path
(list configuration-layer-private-layer-directory) (list configuration-layer-private-layer-directory)