From 4b3ebd99a0f0a3ea95e2d60c63d8d6f9273922e0 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 14 Aug 2021 12:40:52 -0500 Subject: Implement `with-eval-after-loads' macro --- init.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 703dc56..4209a6b 100644 --- a/init.el +++ b/init.el @@ -1009,15 +1009,14 @@ if ripgrep is installed, otherwise `consult-grep'." (:advise completing-read-multiple :filter-args #'crm-indicator)) - (with-eval-after-load 'vertico - (with-eval-after-load 'consult - (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)))))) + (with-eval-after-loads (vertico consult) + (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) @@ -1089,11 +1088,10 @@ if ripgrep is installed, otherwise `consult-grep'." #'which-key--hide-popup-ignore-command) embark-become-indicator embark-action-indicator) - (with-eval-after-load 'embark - (with-eval-after-load 'consult - (setup (:straight embark-consult) - (add-hook 'embark-collect-mode-hook - #'consult-preview-at-point-mode))))) + (with-eval-after-loads (embark consult) + (setup (:straight embark-consult) + (add-hook 'embark-collect-mode-hook + #'consult-preview-at-point-mode)))) (setup (:straight epithet) (add-hook 'Info-selection-hook #'epithet-rename-buffer) -- cgit 1.4.1-21-gabe81