From 418de1e35ab35809c4464cfab20e3b4b27426f04 Mon Sep 17 00:00:00 2001 From: Klas Johansson Date: Sun, 30 May 2010 22:18:52 +0200 Subject: erlang-flymake: By default pass /include and /ebin to compiler Hopefully this covers at least some of the common cases and makes the flymake support more usable as is. The purpose of including the ebin directory is to support things like behaviours and parse transforms. --- lib/tools/emacs/erlang-flymake.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/tools/emacs/erlang-flymake.el') diff --git a/lib/tools/emacs/erlang-flymake.el b/lib/tools/emacs/erlang-flymake.el index a6284a25bc..660e72a6a1 100644 --- a/lib/tools/emacs/erlang-flymake.el +++ b/lib/tools/emacs/erlang-flymake.el @@ -53,11 +53,15 @@ check on newline and when there are no changes)." (defun erlang-flymake-get-code-path-dirs () - ()) + (list (concat (erlang-flymake-get-app-dir) "ebin"))) (defun erlang-flymake-get-include-dirs () - ()) + (list (concat (erlang-flymake-get-app-dir) "include"))) +(defun erlang-flymake-get-app-dir () + (let ((src-path (file-name-directory (buffer-file-name)))) + (file-name-directory (directory-file-name src-path)))) + (defun erlang-flymake-init () (let* ((temp-file (flet ((flymake-get-temp-dir () (erlang-flymake-temp-dir))) -- cgit v1.2.3