Skip to content

Commit

Permalink
gh-4 Enable flycheck when in malabar-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew O. Smith committed Jan 16, 2014
1 parent fd1bf00 commit 3d584e2
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/main/lisp/malabar-flycheck.el
Expand Up @@ -27,11 +27,20 @@
;; "-cp" (malabar-classpath-test buf)
;; (malabar-util-expand-file-name (buffer-file-name buf))))))


(flycheck-define-checker malabar-mode-javac
"Syntax java code on the fly"
:command ("javac"
"-cp" (eval (malabar-classpath-test))
(eval (malabar-util-expand-file-name (buffer-file-name))))
:error-parser flycheck-parse-checkstyle
:modes malabar-mode)
(eval-after-load 'malabar-mode
'(progn
(flycheck-define-checker malabar-mode-javac
"Syntax java code on the fly"
:command ("javac"
"-cp" (eval (malabar-classpath-test))
(eval (malabar-util-expand-file-name (buffer-file-name))))
:error-parser flycheck-parse-checkstyle
:modes malabar-mode)


(defun malabar-flycheck-enable ()
(setq flycheck-checker 'malabar-mode-javac)
(flycheck-mode 1))

(add-hook 'malabar-mode-hook #'malabar-flycheck-enable)))

0 comments on commit 3d584e2

Please sign in to comment.