From 166a47f458dd33c95a84c725fe29dbca25ebf26a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 12 Aug 2021 14:21:05 -0500 Subject: Check that `consult-crm-map' is bound before assigning things to it --- init.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index ac96854..2c1fb85 100644 --- a/init.el +++ b/init.el @@ -1006,12 +1006,13 @@ if ripgrep is installed, otherwise `consult-grep'." (with-eval-after-load 'vertico (with-eval-after-load 'consult - (define-key consult-crm-map "\r" #'+vertico-crm-exit) - (define-key consult-crm-map "\t" #'vertico-exit) - (defun +vertico-crm-exit () - (interactive) - (run-at-time 0 nil #'vertico-exit) - (funcall #'vertico-exit))))) + (when (boundp 'consult-crm-map) + (define-key consult-crm-map "\r" #'+vertico-crm-exit) + (define-key consult-crm-map "\t" #'vertico-exit) + (defun +vertico-crm-exit () + (interactive) + (run-at-time 0 nil #'vertico-exit) + (funcall #'vertico-exit)))))) (setup (:straight crux) -- cgit 1.4.1-21-gabe81