orocos/toolchain/HowtoUseFlyMakeLua

This page briefly describes how to setup Emacs flymake for Lua, which is invaluable for editing rFSM and rttlua code.

  • Update marmalade packages: M-x package-refresh-contents
  • Install marmalade packages flymake, flymake-cursor and flymake-lua using M-x package-install <ENTER> and then entering the above names one by one.
  • install Emacs lua-mode (typically from apt or friends) and lua5.1 (if you havn't already)
  • Add the following to your .emacs:

(flymake-mode t)
(flymake-cursor-mode t)
(require 'flymake-lua)
(add-hook 'lua-mode-hook 'flymake-lua-load)

and reload your .emacs or restart.

Now on-the-fly syntax checking should be enabled for all lua files and immediately highlight errors.