Don't run checkdoc checker on elisp test files
This commit is contained in:
parent
4c1b6b9dea
commit
0f9bff7c71
1 changed files with 8 additions and 1 deletions
|
@ -51,13 +51,20 @@ Start `ielm' if it's not already running."
|
||||||
|
|
||||||
(define-key emacs-lisp-mode-map (kbd "C-c C-z") 'prelude-visit-ielm)
|
(define-key emacs-lisp-mode-map (kbd "C-c C-z") 'prelude-visit-ielm)
|
||||||
|
|
||||||
|
(defun prelude-conditional-emacs-lisp-checker ()
|
||||||
|
"Don't check doc style in Emacs Lisp test files."
|
||||||
|
(let ((file-name (buffer-file-name)))
|
||||||
|
(when (and (file-name) (string-match-p ".*-tests?\\.el\\'" file-name))
|
||||||
|
(setq-local flycheck-checkers '(emacs-lisp)))))
|
||||||
|
|
||||||
(defun prelude-emacs-lisp-mode-defaults ()
|
(defun prelude-emacs-lisp-mode-defaults ()
|
||||||
"Sensible defaults for `emacs-lisp-mode'."
|
"Sensible defaults for `emacs-lisp-mode'."
|
||||||
(run-hooks 'prelude-lisp-coding-hook)
|
(run-hooks 'prelude-lisp-coding-hook)
|
||||||
(turn-on-eldoc-mode)
|
(turn-on-eldoc-mode)
|
||||||
(prelude-remove-elc-on-save)
|
(prelude-remove-elc-on-save)
|
||||||
(rainbow-mode +1)
|
(rainbow-mode +1)
|
||||||
(setq mode-name "EL"))
|
(setq mode-name "EL")
|
||||||
|
(prelude-conditional-emacs-lisp-checker))
|
||||||
|
|
||||||
(setq prelude-emacs-lisp-mode-hook 'prelude-emacs-lisp-mode-defaults)
|
(setq prelude-emacs-lisp-mode-hook 'prelude-emacs-lisp-mode-defaults)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue