From 4a7ccb378d69c9bf3e112130cf9f637894d79fed Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 24 Jul 2024 11:26:17 -0400 Subject: [PATCH] Only load embark target finder for forge in Magit buffers --- emacs/.emacs.d/config/init-completion.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/config/init-completion.el b/emacs/.emacs.d/config/init-completion.el index 47a2b38..c3a6ac3 100644 --- a/emacs/.emacs.d/config/init-completion.el +++ b/emacs/.emacs.d/config/init-completion.el @@ -133,7 +133,10 @@ targets." (s-chomp (thing-at-point 'line t))) ,(line-beginning-position) . ,(line-end-position)))) - (add-to-list 'embark-target-finders #'embark-target-finder-forge) + (defun embark-forge-magit-setup () + (make-local-variable 'embark-target-finders) + (add-to-list 'embark-target-finders #'embark-target-finder-forge)) + (add-hook 'magit-mode-hook #'embark-forge-magit-setup) (defvar-keymap embark-forge-actions :doc "Keymap for actions for forge." :parent embark-general-map