Use :when instead of (when ...) block

For loading dash docsets in feature/lookup module.

Fixes 'Cannot find package' load errors during byte-compilation.
This commit is contained in:
Henrik Lissner 2018-06-22 01:48:04 +02:00
parent 16975d0dc3
commit e4cfdc7fcb
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -122,10 +122,10 @@ argument: the identifier at point.")
;; Dash docset integration ;; Dash docset integration
;; ;;
(when (featurep! +docsets) ;; Both packages depend on helm-dash, for now
;; Both packages depend on helm-dash
(def-package! helm-dash (def-package! helm-dash
:defer t :defer t
:when (featurep! +docsets)
:init :init
(setq helm-dash-enable-debugging doom-debug-mode (setq helm-dash-enable-debugging doom-debug-mode
helm-dash-browser-func #'eww) helm-dash-browser-func #'eww)
@ -136,9 +136,10 @@ argument: the identifier at point.")
(make-directory helm-dash-docsets-path t))) (make-directory helm-dash-docsets-path t)))
(def-package! counsel-dash (def-package! counsel-dash
:when (featurep! :completion ivy) :when (and (featurep! +docsets)
(featurep! :completion ivy))
:commands counsel-dash-install-docset :commands counsel-dash-install-docset
:config (setq counsel-dash-min-length 2))) :config (setq counsel-dash-min-length 2))
;; ;;