diff options
author | Klas Johansson <[email protected]> | 2010-05-30 22:18:52 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-01 13:14:25 +0200 |
commit | 418de1e35ab35809c4464cfab20e3b4b27426f04 (patch) | |
tree | e34b1711e2289c80bfcb38a092de64205178b8e7 | |
parent | 8f0dd817c4df80720ae5bb29d2c6604fe3dadd61 (diff) | |
download | otp-418de1e35ab35809c4464cfab20e3b4b27426f04.tar.gz otp-418de1e35ab35809c4464cfab20e3b4b27426f04.tar.bz2 otp-418de1e35ab35809c4464cfab20e3b4b27426f04.zip |
erlang-flymake: By default pass <app>/include and <app>/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.
-rw-r--r-- | lib/tools/emacs/erlang-flymake.el | 8 |
1 files changed, 6 insertions, 2 deletions
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))) |