aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools
AgeCommit message (Collapse)Author
2010-06-07Add Emacs EUnit feature: run recentChris Bernard
This determines the most recent invocation of EUnit and runs it again -- whether one test or all tests in a module were run (and if all a module's tests were run, whether cover compilation was involved). This can be especially handy when one test is being run repeatedly, eliminating the need to position the cursor in the desired test just to run it. Default keybinding: C-c C-e l
2010-06-07Add Emacs EUnit feature: auto-saveChris Bernard
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.
2010-06-07erlang-eunit: Optionally run code coverage analysis during eunit testsKlas Johansson
Add a number of features to the emacs mode which make it easier to work with eunit test cases while keeping track of code coverage. * C-cC-ec: Compile the module under test for code coverage analysis, run tests and show the results of the coverage analysis in a new buffer. * C-c-C-ev: Compile the current module for code coverage analysis. * C-cC-ea: Show the results of the coverage analysis in a new buffer.
2010-06-07erlang-eunit: Made alternative locations of files more flexibleKlas Johansson
Previously there were only two options: either the EUnit test file was placed directly within the test directory or within the same directory as the source file. Now a list of candidate locations are supported. This way more than two alternative locations are supported as well as arbitrarily deep directory structures (i.e. test/eunit/x_tests.erl). The default behaviour is still the same, but it's possible to specify locations by setting the following two variables: erlang-eunit-src-candidate-dirs erlang-eunit-test-candidate-dirs
2010-06-01Merge branch 'dgud/emacs-catch-improvements' into devErlang/OTP
* dgud/emacs-catch-improvements: Improved indentation of old catch. Added more type highlighting and fixed record indentation with types.
2010-06-01Improved indentation of old catch.Dan Gudmundsson
An example that didn't work previously. case Foo of {ok, X} -> ok; _ -> catch file:close(FD) end.
2010-06-01Added more type highlighting and fixed record indentation with types.Dan Gudmundsson
Type highlighting reported by Jay Nelson non_neg_integer() will highlight purple but pos_integer() does not. Closing record indentation problem reported by Maxim Treskin: -record(state, { sequence_number = 1 :: integer() }).
2010-06-01erlang-flymake: Document in READMEKlas Johansson
2010-06-01erlang-flymake: Make the syntax check command configurableKlas Johansson
2010-06-01erlang-flymake: By default pass <app>/include and <app>/ebin to compilerKlas Johansson
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.
2010-06-01erlang-flymake: Include in MakefileKlas Johansson
2010-06-01erlang-flymake: Syntax check erlang code on the fly (using flymake)Klas Johansson
2010-05-28OTP-8647 Xref adds calls to operators when {builtins,true}Hans Bolinder
When given the option {builtins,true} Xref now adds calls to operators.
2010-05-26Merge branch 'mh/escript-erlang-mode' into devErlang/OTP
* mh/escript-erlang-mode: Associate files using interpreter "escript" with Erlang mode
2010-05-26Merge branch 'cb/emacs-eunit-run-current-test' into devErlang/OTP
* cb/emacs-eunit-run-current-test: Add Emacs EUnit utility feature: run current test function.
2010-05-26Merge branch 'mh/fix-record-indentation' into devErlang/OTP
* mh/fix-record-indentation: Fix indentation of records with line breaks inside lists
2010-05-26Merge branch 'mh/inferior-erlang-cmd-uniq' into devErlang/OTP
* mh/inferior-erlang-cmd-uniq: inferior-erlang: specify command to run, uniquify buffer names
2010-05-26Merge branch 'mh/erlang-mode-imenu-arity' into devErlang/OTP
* mh/erlang-mode-imenu-arity: Let imenu distinguish functions by arity
2010-05-24Set erlang-mode-map when loading erlang.elMagnus Henoch
Create and assign the erlang-mode keymap to erlang-mode-map once erlang.el is loaded, not the first time it is used. This way of doing it follows the Emacs Lisp convention described at http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips-for-Defining.html and also makes it easier for users to customize the keymap. Remove the now unneeded functions erlang-keymap-init and erlang-mode-commands. Also move the definition of inferior-erlang-use-cmm, so it is available when defining erlang-mode-map.
2010-05-20Let imenu distinguish functions by arityMagnus Henoch
Make the function names used by M-x imenu contain the function arity as well as the name. This makes it possible to jump to all functions of the same name, as opposed to only the one that is defined first. For example, in the following module there is now a way to jump directly to foo/1: -module(foo). foo() -> ok. bar() -> error. foo(A) -> {ok, A}.
2010-05-19Change make:files to behave more like erlcSam Bobroff
Currently make:files will fail with the atom 'error' and no message when the input (.erl) file is unreadable or the output (.beam) file is unwritable. This differs from erlc which will print a useful error message, or when possible, remove the unwritable output file and continue successfully. This change removes the unnecessary checks on the files when make:files is called and allows the error checking to be done in compile:file, where the error messages are produced. It does not affect the return value. In particular this resolves the mysterious problem of make:files failing but erlc succeeding, caused by an unwritable (usually root owned) beam file in an otherwise writable build directory.
2010-05-18Fix indentation of records with line breaks inside listsMagnus Henoch
Trying to indent this piece of code by hitting TAB on each line: foo() -> [#foo{ foo = foo}]. used to cause an error. Fix by ignoring errors when trying to skip backwards from a record. Also add this test case to test.erl.orig and test.erl.indented.
2010-05-18inferior-erlang: specify command to run, uniquify buffer namesMagnus Henoch
Add a new feature to the command inferior-erlang: when called with a prefix argument, prompt for the command to execute to start the Erlang shell. When possible (i.e., in Emacs 23 and later), allow tab completion as in a normal shell. Also create the shell buffer in such a way that, if uniquify-buffer-name-style is not nil and several Erlang shell buffers are started in different directories, the names of those buffers reflect their working directories instead of being *erlang*, *erlang*<2>, etc.
2010-05-18Associate files using interpreter "escript" with Erlang modeMagnus Henoch
A file whose first line contains "#!/usr/bin/env escript" should be opened in erlang-mode, even if its name doesn't end in ".erl". Add an entry to interpreter-mode-alist to that effect.
2010-05-18Add Emacs EUnit utility feature: run current test function.Chris Bernard
This determines the current test function under point (cursor), whether the active buffer contains a test module (foo_tests) or the module itself (foo), then compiles the source module (and test module if present) and runs that test function. Since this added a third testing feature, there was some natural duplication that needed to be factored out. The notion of 'compile and run tests' was decoupled from exactly which tests should be run. The definitions of default keybindings were converted to a list for clarity and conciseness.
2010-05-11Merge branch 'dgud/emacs-21-fix' into devErlang/OTP
* dgud/emacs-21-fix: Remove usage of 'font-lock-preprocessor-face' if not available
2010-05-04Merge branch 'rd/erlang-eunit' into devErlang/OTP
* rd/erlang-eunit: erlang-eunit.el: Require cl, as it is used
2010-05-03Remove usage of 'font-lock-preprocessor-face' if not availableDan Gudmundsson
i.e. in emacs-21
2010-03-22erlang-eunit.el: Require cl, as it is usedRalf Doering
erlang-eunit.el (part of erlang-mode) uses "flet", which is only available if emacs package cl was loaded. The docs of the CL package suggest that '...packages installed in Emacs must not load "CL" at run time.' We honour this by using eval-when-compile. This fixes warnings when byte-compiling erlang-eunit.el with: emacs -batch -f batch-byte-compile erlang-eunit.el The warning fixed is: In erlang-eunit-compile-and-run-tests: erlang-eunit.el:146:4:Warning: `(save-some-buffers (&optional any) nil)' is a malformed function This bug was reported initially against Ubuntu packages, see https://bugs.launchpad.net/bugs/541893 for reference Signed-off-by: Ralf Doering <[email protected]>
2010-03-22Merge branch 'dgud/emacs-bugfixes' into devErlang/OTP
* dgud/emacs-bugfixes: Fix another -spec() problem Add missing elisp files to the the release target Fix electric semi-colon and tuples inside lists OTP-8530 dgud/emacs-bugfixes Fixed emacs-mode installation problems and some other minor issues.
2010-03-15Fix another -spec() problemDan Gudmundsson
2010-03-15Add missing elisp files to the the release targetDan Gudmundsson
2010-03-15Fix electric semi-colon and tuples inside listsDan Gudmundsson
2010-03-03OTP-8472 tools: xref: re/regexpHans Bolinder
Xref has been updated to use the re module instead of the deprecated regexp module.
2010-03-02OTP-8469 tools: race in CoverHans Bolinder
A race condition affecting Cover has been removed.
2010-02-19Update release notesBjörn-Egil Dahlberg
2010-02-17emacs: Update test suite skeletonsPeter Andersson
2010-02-15Merge branch 'dgud/emacs-mode' into ccase/r13b04_devErlang/OTP
* dgud/emacs-mode: Added the old style skeletons, and a variable to change. Move code skeletons to a separate file. OTP-8446 dgud/emacs-mode
2010-02-11OTP-8430: tools: xref_SUITE updatedBjörn Gustavsson
2010-02-10Merge branch 'egil/lcnt' into ccase/r13b04_devErlang/OTP
* egil/lcnt: Add test suite for lcnt in tools Add lcnt:rt_opt/1 bindings to erts_debug Add runtime option to enable/disable lcnt stats Add auto width on string output Add lcnt documentation Add lock profiling tool OTP-8424 Add lock profiling tool. The Lock profiling tool, lcnt, can make use of the internal lock statistics when the runtime system is built with this feature enabled. This provides a mechanism to examine potential lock bottlenecks within the runtime itself. - Add erts_debug:lock_counters({copy_save, bool()}). This option enables or disables statistics saving for destroyed processes and ets-tables. Enabling this might consume a lot of memory. - Add id-numbering for lock classes which is otherwise undefined.
2010-02-08Add test suite for lcnt in toolsBjörn-Egil Dahlberg
2010-02-08Add lcnt:rt_opt/1 bindings to erts_debugBjörn-Egil Dahlberg
Runtime options for copy_save.
2010-02-08Add auto width on string outputBjörn-Egil Dahlberg
2010-02-08Add lcnt documentationBjörn-Egil Dahlberg
Documentation for the lock profiling tool
2010-02-08Add lock profiling toolBjörn-Egil Dahlberg
The Lock profiling tool, lcnt, can make use of the internal lock statistics when the runtime system is built with this feature enabled. This provides a mechanism to examine potential lock bottlenecks within the runtime itself.
2010-01-29Added the old style skeletons, and a variable to change.Dan Gudmundsson
2010-01-29Move code skeletons to a separate file.Dave Peticolas
Use the updated skeletons from the Erlware Mode.
2010-01-19Add test suite for the tools applicationBjörn Gustavsson
2009-12-18Emacs: Added indentation inside parenthesisDan Gudmundsson
Used in records or tuple creation: -record(record3, {a = 8#42423 bor 8#4234, b = 8#5432 bor 2#1010101 c = 123 + 234, d}). and in functions calls call(2#42423 bor #4234, 2#5432, other_arg),
2009-12-17More -spec indentation fixes.Dan Gudmundsson