Only load embark target finder for forge in Magit buffers

This commit is contained in:
Jeremy Dormitzer 2024-07-24 11:26:17 -04:00
parent 05d94e2646
commit 4a7ccb378d

View File

@ -133,7 +133,10 @@ targets."
(s-chomp (thing-at-point 'line t))) (s-chomp (thing-at-point 'line t)))
,(line-beginning-position) ,(line-beginning-position)
. ,(line-end-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 (defvar-keymap embark-forge-actions
:doc "Keymap for actions for forge." :doc "Keymap for actions for forge."
:parent embark-general-map :parent embark-general-map