From f8fc2e9baf6fa0f46232dd6804b35716837a0859 Mon Sep 17 00:00:00 2001 From: James Nguyen Date: Sat, 6 Jan 2018 11:25:33 -0800 Subject: [PATCH] Use featurep check This also gates requiring evil-collection-integration. The rationale is that it's probably better not to require both evil-collection-integration and evil-integration together as that might cause weirder behavior than the alternative. --- evil-collection.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/evil-collection.el b/evil-collection.el index df203a5..8b45ba6 100644 --- a/evil-collection.el +++ b/evil-collection.el @@ -33,13 +33,12 @@ ;;; Code: -;; FIXME: Is this the best way to do this? -(when (bound-and-true-p evil-want-integration) - (message - "Make sure to set ~evil-want-integration~ before loading evil or evil-collection.")) - (require 'evil) -(require 'evil-collection-integration) + +(if (featurep 'evil-integration) + (message + "Make sure to set ~evil-want-integration~ to nil before loading evil or evil-collection.") + (require 'evil-collection-integration)) (defgroup evil-collection nil "A set of keybindings for Evil mode"