From 214411edb4d8eb50e33d4ca372cbbe9bc54ae72e Mon Sep 17 00:00:00 2001 From: Sorawee Porncharoenwase Date: Tue, 4 Aug 2020 17:30:39 -0700 Subject: [PATCH] racket-mode: avoid using flycheck-disable-checker The problem is that at this point, flycheck-mode might not be active yet. Calling flycheck-disable-checker always call (flycheck-buffer) which would result in an error: (user-error "Flycheck mode disabled") --- modules/lang/racket/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/racket/config.el b/modules/lang/racket/config.el index 1e4b8e8e3..853a877d9 100644 --- a/modules/lang/racket/config.el +++ b/modules/lang/racket/config.el @@ -34,7 +34,8 @@ (when (featurep! :checkers syntax) (add-hook! 'racket-xp-mode-hook (defun +racket-disable-flycheck-h () - (flycheck-disable-checker 'racket))))) + (unless (memq 'racket flycheck-disabled-checkers) + (push 'racket flycheck-disabled-checkers)))))) (unless (or (featurep! :editor parinfer) (featurep! :editor lispy))