From 0f9bff7c71a19f28377000c30577fc77b3833780 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 29 Apr 2013 10:56:32 +0300 Subject: [PATCH] Don't run checkdoc checker on elisp test files --- modules/prelude-emacs-lisp.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/prelude-emacs-lisp.el b/modules/prelude-emacs-lisp.el index 348733a..5c02286 100644 --- a/modules/prelude-emacs-lisp.el +++ b/modules/prelude-emacs-lisp.el @@ -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) +(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 () "Sensible defaults for `emacs-lisp-mode'." (run-hooks 'prelude-lisp-coding-hook) (turn-on-eldoc-mode) (prelude-remove-elc-on-save) (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)