From 3bc256ccb22ebf9cd823cf0ea63783971367644a Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 7 Dec 2017 22:45:28 +0100 Subject: [PATCH] Add support for lambda in evil-collection-mode-list --- evil-collection.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evil-collection.el b/evil-collection.el index 9b318df..f6a67cd 100644 --- a/evil-collection.el +++ b/evil-collection.el @@ -78,7 +78,7 @@ ivy macrostep man - ,@(when evil-collection-setup-minibuffer '(minibuffer)) + (minibuffer . (lambda () (when evil-collection-setup-minibuffer '(minibuffer)))) ;; occur is in replace.el which was built-in before Emacs 26. (occur ,(if (<= emacs-major-version 25) "replace" 'replace)) outline @@ -103,7 +103,7 @@ Elements are either target mode symbols or lists which `car' is the mode symbol and `cdr' the packages to register. By default, `minibuffer' is not included because many users find -this confusing. It will be included if +this confusing. It will be included if `evil-collection-setup-minibuffer' is set to t." :type '(repeat (choice symbol sexp)) :group 'evil-collection) @@ -124,7 +124,7 @@ instance: (reqs (list mode))) (when (listp mode) (setq m (car mode) - reqs (cdr mode))) + reqs (if (functionp (cdr mode)) (funcall (cdr mode)) (cdr mode)))) (dolist (req reqs) (with-eval-after-load req (require (intern (concat "evil-collection-" (symbol-name m))))