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

Anders Nygren anders.nygren@REDACTED
Wed Nov 7 19:24:02 CET 2007


On Nov 7, 2007 12:13 PM, Anders Nygren <anders.nygren@REDACTED> wrote:
>
> On Nov 7, 2007 10:31 AM, mog <mogorman@REDACTED> 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
>

Nevermind, I found that adding

 (add-hook 'find-file-hook 'flymake-find-file-hook)

in my .emacs fixes it.

/Anders



More information about the erlang-questions mailing list