 ;; Provides Clojure and ClojureScript REPL integration, including
 ;; documentation and source lookups, among many other features.
 (use-package cider
-  :if (radian-package-enabled-p 'clojure-mode 'cider)
+  :dependencies (clojure-mode)
   :defer t
   :config
 

;; Provides a general-purpose completion and narrowing mechanism, and
;; enhanced versions of many standard Emacs commands that use it.
(use-package helm
  :if (radian-package-enabled-p 'helm)
  :demand t
  :config


;; Tell use-package to always install missing packages if necessary.
(setq use-package-always-ensure t)

;; Add an advice to `use-package' to make it so that disabled packages
;; are not loaded. See the docstring for more information.

(defun use-package--radian (use-package name &rest args)
  "Only initialize and load a package if it is enabled (according
to `radian-package-enabled-p'). If the first argument specified
after the package name is :dependencies, then also require any
packages specified in the list of symbols immediately
following :dependencies to be enabled."
  (when (radian-package-enabled-p name)
    (if (equal (car args) :dependencies)
        (when (radian--every 'radian-package-enabled-p (cadr args))
          (apply use-package name (cddr args)))
      (apply use-package name args))))

(advice-add 'use-package :around 'use-package--radian)

;; Load deprecated user-specific configuration file.
(radian-load-user-config "init.post.local.el")

