flymake mode

I’ve been using flymake mode lately.

I’ve really only started to use flymake-mode after I also began using maven. Thanks to pom-parser I can configure my projects directly from pom.xml, no need to manually setup multiple classpaths, pom-parser takes care of this.

Here’s the steps:

  • setup your pom.xml
  • setup a simple prj.el like this:
(jde-project-file-version "1.0")
     (quote ("-Xlint:all" "-Xlint:-serial"))))
(require 'pom-parser)
(with-pom ()
  (pom-set-jde-variables *pom-node*))
  • You’ll need to download the eclipse compiler. At the time of this writing I’m using 3.3.2, the latest eclipse. Save the ecj.jar some place convenient. I like to put mine with the emacs config so I can easily locate the correct version of the jar.
  • Enable flymake mode: M-x flymake-mode, or bind it to a key for a mode that makes sense: <tt>(define-key jde-mode-map [f11] ‘flymake-mode)</tt>
  • That’s it. Pretty easy.

Here’s rest of my flymake settings:

        (cons '(&quot;\\.java\\'&quot;  . (jde-ecj-server-flymake-init jde-ecj-flymake-cleanup))
              flymake-allowed-file-name-masks  ))
    '(flymake-no-changes-timeout 2.0)
    '(flymake-log-level 3)
    '(flymake-start-syntax-check-on-newline nil)
    '(jde-compiler '((&quot;eclipse java compiler server&quot; &quot;~/emacs/ecj-3.3M6.jar&quot;)))
    '(jde-ecj-command-line-args (quote (&quot;-d&quot; &quot;none&quot; &quot;-1.5&quot; &quot;-warn:unused,semicolon&quot; &quot;-maxProblems&quot; &quot;50&quot; &quot;-g&quot;)))
About these ads

About this entry