[erlang-questions] program: adding flymake (emacs) support for erlang!

Anders Nygren <>
Wed Nov 7 19:13:56 CET 2007


On Nov 7, 2007 10:31 AM, mog <> wrote:
> add this to your .emacs
>
> (when (load "flymake" t)
>   (defun flymake-erlang-init ()
>     (let* ((temp-file (flymake-init-create-temp-buffer-copy
>                        'flymake-create-temp-inplace))
>            (local-file (file-relative-name
>                         temp-file
>                         (file-name-directory buffer-file-name))))
>       (list "eflymake" (list local-file))))
>
>   (add-to-list 'flymake-allowed-file-name-masks
>                '("\\.erl\\'" flymake-erlang-init)))
>
> and add this to your path somewhere
>
> filename: eflymake
> #!/usr/bin/env escript
> -export([main/1]).
>
> main([File_Name]) ->
>     compile:file(File_Name, [warn_obsolete_guard, warn_unused_import,
> warn_shadow_vars, warn_export_vars, strong_validation, report]).
>
>
> then just turn on flymake and rock out while you develop.
>

Sorry to be quite helpless with emacs tweaking, how do I
"just turn on flymake"?

/Anders



More information about the erlang-questions mailing list