              (dir (plist-get (cdr layer) :dir))
              (pkg-file (concat dir "packages.el")))
         (when (file-exists-p pkg-file)
-          (configuration-layer/load-file pkg-file)
+          (load pkg-file)
           (let ((excl-var (intern (format "%s-excluded-packages"
                                           (symbol-name layer-sym)))))
             (when (boundp excl-var)

  "Return a sorted list of the keys in the given hash table H."
  (mapcar 'intern (sort (mapcar 'symbol-name (ht-keys h)) 'string<)))

(defun configuration-layer/load-file (file)
  "Assure that FILE is loaded only once."
  (unless (member file configuration-layer--loaded-files)
    (load file)
    (push file configuration-layer--loaded-files)))

(defun configuration-layer/get-excluded-packages (layers)
  "Read `layer-excluded-packages' lists for all passed LAYERS and return a list
of all excluded packages."


(defvar configuration-layer-excluded-packages '()
  "List of all excluded packages declared at the layer level.")

(defun configuration-layer/sync ()
  "Synchronize declared layers in dotfile with spacemacs."
