From 5e0817b944dedee4d56798265e6ea2536361dd5a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 1 Aug 2020 18:23:44 +0100 Subject: +made a simple flycheck system to turn on flycheck mode if not already on --- Emacs/.config/emacs/config.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 1f56fe0..4a70ca0 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -537,7 +537,14 @@ #+BEGIN_SRC emacs-lisp (use-package flycheck :commands flycheck-mode - :bind ("C-c x" . flycheck-list-errors)) + :bind ("C-c x" . +flycheck/list-errors-load-flycheck) + :config + (defun +flycheck/list-errors-load-flycheck () + "Load flycheck if not available, then list errors." + (interactive) + (when (not (or flycheck-mode global-flycheck-mode)) + (flycheck-mode)) + (flycheck-list-errors))) #+END_SRC ** Activate tabs Set tabs to nil by default, with normal tab size set to 2. -- cgit v1.2.3-13-gbd6f