spacemacs/add-flycheck-hook was not really hooking anything, change the name to better reflect what it does. Also changed the push for a add-to-list to avoid duplicates.
19 lines
616 B
EmacsLisp
19 lines
616 B
EmacsLisp
;;; funcs.el --- Syntax Checking Layer functions File for Spacemacs
|
|
;;
|
|
;; Copyright (c) 2012-2017 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
|
|
|
|
(defun spacemacs/enable-flycheck (mode)
|
|
"Use flycheck in MODE by default, if `syntax-checking-enable-by-default' is
|
|
true."
|
|
(when (and syntax-checking-enable-by-default
|
|
(listp flycheck-global-modes)
|
|
(not (eq 'not (car flycheck-global-modes))))
|
|
(add-to-list 'flycheck-global-modes mode)))
|