Properly remove flymake hooks during deactivation

This commit is contained in:
Jessie Hildebrandt 2023-10-13 17:06:03 -04:00
parent 58e85c8150
commit 74546fa7bb

View File

@ -865,6 +865,12 @@ Checkers checked, in order: `flycheck', `flymake'."
(remove-hook 'flycheck-mode-hook (remove-hook 'flycheck-mode-hook
#'mood-line--checker-flycheck-update-segment) #'mood-line--checker-flycheck-update-segment)
;; Remove flymake hooks
(advice-remove 'flymake-start
#'mood-line--checker-flymake-update-segment)
(advice-remove 'flymake--handle-report
#'mood-line--checker-flymake-update-segment)
;; Remove VC hooks ;; Remove VC hooks
(remove-hook 'file-find-hook (remove-hook 'file-find-hook
#'mood-line--vc-update-segment) #'mood-line--vc-update-segment)