diff options
author | Chris Bernard <[email protected]> | 2010-05-29 21:16:51 -0400 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-07 14:27:11 +0200 |
commit | 1a20478bbcec1c98c065553b4b0d4ccaec96b24a (patch) | |
tree | bb319809c8ec430db986f08c2f03941a985205cc /lib/tools | |
parent | d08f4b3166c96b2563d4d0328513191986c90b96 (diff) | |
download | otp-1a20478bbcec1c98c065553b4b0d4ccaec96b24a.tar.gz otp-1a20478bbcec1c98c065553b4b0d4ccaec96b24a.tar.bz2 otp-1a20478bbcec1c98c065553b4b0d4ccaec96b24a.zip |
Add Emacs EUnit feature: auto-save
If the variable 'erlang-eunit-autosave' is non-nil, buffers will be
automatically saved just before running tests -- the "Do you want
to save?" prompt will be inhibited. This can be useful, reducing the
save-compile-load-test cycle to just one keychord.
Diffstat (limited to 'lib/tools')
-rw-r--r-- | lib/tools/emacs/erlang-eunit.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/tools/emacs/erlang-eunit.el b/lib/tools/emacs/erlang-eunit.el index 803c26c5b1..4952ab7d2e 100644 --- a/lib/tools/emacs/erlang-eunit.el +++ b/lib/tools/emacs/erlang-eunit.el @@ -33,6 +33,10 @@ if there is no match.") a source file. The first directory in the list will be used, if there is no match.") +(defvar erlang-eunit-autosave nil + "*Set to non-nil to automtically save unsaved buffers before running tests. +This is useful, reducing the save-compile-load-test cycle to one keychord.") + ;;; ;;; Switch between src/EUnit test buffers ;;; @@ -271,7 +275,7 @@ With prefix arg, compiles for debug and runs tests with the verbose flag set." ;; below, is to ask the question about saving buffers only once, ;; instead of possibly several: one for each file to compile, ;; for instance for both x.erl and x_tests.erl. - (save-some-buffers) + (save-some-buffers erlang-eunit-autosave) (flet ((save-some-buffers (&optional any) nil)) ;; Compilation of the source file is mandatory (the file must |