Don't accidently autoload flycheck

This commit is contained in:
TEC 2022-09-14 19:43:01 +08:00
parent c6d4befbfc
commit 93453b1d48
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 16 additions and 15 deletions

View File

@ -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