spacemacs/layers/syntax-checking/funcs.el

19 lines
610 B
EmacsLisp
Raw Normal View History

;;; funcs.el --- Syntax Checking Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
2016-01-27 20:08:25 +00:00
(defun spacemacs/add-flycheck-hook (mode)
"Use flycheck in MODE by default, if `syntax-checking-enable-by-default' is
true."
(when (and syntax-checking-enable-by-default
2016-02-01 04:16:50 +00:00
(listp flycheck-global-modes)
(not (eq 'not (car flycheck-global-modes))))
2016-01-27 20:08:25 +00:00
(push mode flycheck-global-modes)))