From 93453b1d48ad4c16351c43752ef828c8e9851cb8 Mon Sep 17 00:00:00 2001 From: TEC Date: Wed, 14 Sep 2022 19:43:01 +0800 Subject: [PATCH] Don't accidently autoload flycheck --- config.org | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/config.org b/config.org index 258989e..c622185 100644 --- a/config.org +++ b/config.org @@ -8295,21 +8295,22 @@ regurgitate the code, cross our fingers, and hope it works. ,@(seq-map (lambda (opt) `(setq-default ,opt ',(symbol-value opt))) (seq-filter #'boundp flycheck-org-lint-variables)))) -(flycheck-define-checker org-lint - "Org buffer checker using `org-lint'." - :command ("emacs" (eval flycheck-emacs-args) - "--eval" (eval (concat "(add-to-list 'load-path \"" - (file-name-directory (locate-library "org")) - "\")")) - "--eval" (eval (flycheck-sexp-to-string - (flycheck-org-lint-variables-form))) - "--eval" (eval (flycheck-sexp-to-string - (flycheck-org-lint-customisations-form))) - "--eval" (eval flycheck-org-lint-form) - "--" source) - :error-patterns - ((error line-start line ": " (message) line-end)) - :modes org-mode) +(eval ; To preveant eager macro expansion form loading flycheck early. + '(flycheck-define-checker org-lint + "Org buffer checker using `org-lint'." + :command ("emacs" (eval flycheck-emacs-args) + "--eval" (eval (concat "(add-to-list 'load-path \"" + (file-name-directory (locate-library "org")) + "\")")) + "--eval" (eval (flycheck-sexp-to-string + (flycheck-org-lint-variables-form))) + "--eval" (eval (flycheck-sexp-to-string + (flycheck-org-lint-customisations-form))) + "--eval" (eval flycheck-org-lint-form) + "--" source) + :error-patterns + ((error line-start line ": " (message) line-end)) + :modes org-mode)) #+end_src Turns out it almost works. Running =M-x flycheck-verify-setup= after running that