aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs
AgeCommit message (Collapse)Author
2016-09-05Implement the new ceil/1 and floor/1 guard BIFsBjörn Gustavsson
Implement as ceil/1 and floor/1 as new guard BIFs (essentially part of Erlang language). They are guard BIFs because trunc/1 is a guard BIF. It would be strange to have trunc/1 as a part of the language, but not ceil/1 and floor/1.
2016-08-31Emacs: make tags unit test more robustJohan Claesson
2016-08-31Emacs: extend support for compile optionsJohan Claesson
The syntax was limited to atoms, strings and 2-tuples. This covers most compile options but not for example {d,Macro,Value}. Add support for N-tuples and lists. Add a related unit test case.
2016-08-31Function instead of lambda in adviceJohan Claesson
Lambda advice cannot easily be updated.
2016-08-31Enable tag completion in emacs erlang shellJohan Claesson
Completion in erlang shell buffer only works in Emacs 25. Minor cleanup of completion stuff. Add test-case for completion at point. Avoid inf-loop in erlang-end-of-clause when buffer starts with whitespace.
2016-08-18Include trap_exit in server skeletonsRaimo Niskanen
2016-08-02Rewrite Tools for gen_statem M:callback_mode/0Raimo Niskanen
2016-07-18Fix type and template errors from bugs.erlang.org: ERL-172 and ERL-187Raimo Niskanen
2016-06-14Tag completion in Emacs 25Johan Claesson
Adapt tag completion for changes in Emacs 25. Stop storing module:tag entries in the completion table for definitions in hrl-files. These entries make no sense since hrl-files are not modules. Add test-case for tag completion in erlang-test.el. Ensure prog-mode is defined for the sake of Emacs 23 and XEmacs.
2016-05-23emacs: Improve default tag searchDan Gudmundsson
Add current module to non external functions calls. Also improves finding record and macro definitions.
2016-05-23Let find-tag visit definitions in right orderJohan Claesson
The right order is defined by find-tag-tag-order which is a list of predicate functions. Tags matched by the first function shall be visited first. After that tags matched by the seconds function shall be visited and so on. Previous behavior was to visit tags that match any of the functions in the order they appear in the TAGS file. Reported by Dan Gudmundsson.
2016-05-20Merge branch 'dgud/tools/emacs-xref/PR-1051'Dan Gudmundsson
* dgud/tools/emacs-xref/PR-1051: Add xref support in erlang.el Conflicts: lib/tools/emacs/erlang.el
2016-05-20Add xref support in erlang.elJohan Claesson
In GNU Emacs 25 xref will be introduced. It is a framework for cross referencing commands, in particular commands for finding definitions. It does not replace etags. It rather resides on top of it and provides user-friendly commands. The idea is that the user commands should be the same regardless of what back-end does the actual finding of definitions. Add to the xref commands awareness of the module:tag syntax in a similar way that is already done for the old etags commands. Xref completion support is not included in this commit. Remove all compilation warnings for GNU Emacs 24.5 and current 25 (4ffec91). Remove XEmacs incompatibility in erlang-font-lock-exported-function-name-face. Add file erlang-test.el with a single unit test. Add TAGS to .gitignore.
2016-05-18Fix line-initial commas' indentation in type specsDániel Szoboszlay
Inside type specs, line-initial commas shall align with open curly braces. This also applies to record definitions with type specs for the fields. For example: -type foo() :: { a :: integer() , b :: integer() }. For type specs for functions, the commas shall align with the opening parenthese. So do a closing parenthese when put on a new line. For example: -spec foo( X :: integer() , Y :: integer() ) -> integer(). This does not affect coding styles that don't put commas at the beginning of lines.
2016-04-29Merge remote-tracking branch 'erlang/pr/1006'Dan Gudmundsson
* erlang/pr/1006: Use define-derived-mode to define erlang-mode
2016-04-25Merge branch 'raimo/new-gen-state-machine/OTP-13065'Raimo Niskanen
* raimo/new-gen-state-machine/OTP-13065: (52 commits) Add section on state filtering Promote gen_statem over gen_fsm Modify code_change/4 to return CallbackMode Use ?NAME macro in examples Introduce Fred Herbert suggested additions Introduce corrections from Fred Hebert and Ingela Use .png pictures instead of .gif Write Design Principles chapter Fix missing short forms for event timeout Do more intricate Fred Hebert doc changes Change Caller -> From as suggested by Fred Hebert Do documentation improvements from Fred Hebert Fix broken documenation reference Rename state_timeout -> event_timeout Fix most of the system docs and emacs mode Change code_change/4 to {ok,State,Data} Fixup sharpened test suite Sharpen test suite Remove the remove_event action and all alike Relax caller() type check and cleanup ... Conflicts: lib/stdlib/src/gen.erl lib/stdlib/src/gen_event.erl lib/stdlib/src/gen_fsm.erl lib/stdlib/src/gen_server.erl lib/stdlib/test/error_logger_forwarder.erl
2016-04-16Use define-derived-mode to define erlang-modeMagnus Henoch
Remove some things that define-derived-mode does for us. Also, derive erlang-mode from prog-mode, so that a user that has added customizations meant for all programming language major modes will enjoy those in Erlang mode as well.
2016-03-15update copyright-yearHenrik Nord
2016-03-03Fix most of the system docs and emacs modeRaimo Niskanen
2016-02-25Add has_prepared_code_on_load/1 BIFBjörn Gustavsson
2016-02-17Erlang mode for Emacs: Include ct.hrl instead test_server.hrlBjörn Gustavsson
2015-09-15Don't add newline after arrow on -callback linesMagnus Henoch
In the Emacs Erlang mode, typing "->" will usually automatically add a newline, which is usually what you want when writing a function, but not when writing a type spec. Therefore, there is a check for not adding the newline when the current line starts with -spec or -type. This change adds -callback to that check, since it is usually written the same way as type specs.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-16Remove void() type in documentationPeter Andersson
2015-06-09tools: Add new bifs to emacs highlighterDan Gudmundsson
2015-04-20Minor fixes to emacs erlang-modeSteve Vinoski
Fix "Unbalanced parentheses" error when indenting particular map constructs. Add new test cases for this fix. To prevent infinite looping when the programmer mistakenly enters incorrect syntax, detect cases where erlang-partial-parse fails to advance when called within a loop, and raise an "Illegal syntax" error.
2015-03-19Merge branch 'maint'Zandra Hird
2015-03-16Fix tags completion in erlang.el for GNU Emacs 23+Johan Claesson
The tag completion code was changed in GNU Emacs 23.1 in a way that broke erlang.el tag completion. This commit fix that for Emacs 23.1 and later. Add progress report while building completion table. Add completion of module_info/0 for all modules. Add lib/tools/emacs/*.elc to .gitignore.
2014-11-06Merge branch 'siri/sup-spec-maps/OTP-11043'Siri Hansen
* siri/sup-spec-maps/OTP-11043: Update emacs skeleton for supervisor to use maps Update dialyzer test with maps in supervisor properties Add documentation of maps in supervisor flags and child specs Add test of maps in supervisor flags and child specs New function supervisor:get_childspec/2 Allow maps for supervisor flags and child specs Rebase supervisor Add more tests of supervisor
2014-11-06Update emacs skeleton for supervisor to use mapsSiri Hansen
The example in the skeleton now uses maps instead of the old tuple format for supservisor flags and child specifications.
2014-11-04Merge branch 'davidw/add-spec-skel' into maintBruce Yinhe
OTP-12283 * davidw/add-spec-skel: Removed extra space following paren First attempt at adding a skel for -spec's
2014-11-03Removed extra space following parenDavid N. Welton
2014-10-09Add wx_object as emacs skeletonOlle Mattsson
2014-10-06First attempt at adding a skel for -spec'sDavid N. Welton
New skel adds a -spec for the function after point.
2014-10-02Merge branch 'goofansu/fix-gen-event-comment' into maintBruce Yinhe
OTP-12214 * goofansu/fix-gen-event-comment: Fix typo in erlang-mode comment
2014-09-10Fix typo in erlang-mode commentgoofansu
2014-09-09Add new bif to emacs modeDan Gudmundsson
2014-06-05Remove invalid 'bitstr' exports in erlang.erlRickard Green
The dummy BIF exports 'erlang:bitstr_to_list/1' and 'erlang:list_to_bitstr/1' seem to have appeared as a result of a copy-paste error and are now removed.
2014-03-19Merge branch 'technomancy/emacs-autoload'Henrik Nord
* technomancy/emacs-autoload: Activate Emacs erlang-mode for .app files inside ebin directory. Add more file types to Emacs auto-mode-alist. Add Emacs autoloads for .erl and .app.src. OTP-11788
2014-03-13Activate Emacs erlang-mode for .app files inside ebin directory.Phil Hagelberg
2014-03-13Add more file types to Emacs auto-mode-alist.Phil Hagelberg
2014-03-13Add Emacs autoloads for .erl and .app.src.Phil Hagelberg
2014-03-04match erlang keywords more carefullySteve Vinoski
Use word boundaries in some regex matching to avoid recognizing words that begin with keywords as keywords themselves, for example avoid recognizing a function named catcher as the catch keyword. Add a regression test for this problem.
2014-02-06tools: Update emacs mode with map highlightsLukas Larsson
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-skel-indent' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-sexp-error' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-fun-arity' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-error-fixes' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-16fix emacs erlang skeleton indentationSteve Vinoski
When inserting skeletons in emacs, some Erlang language elements such as case, receive, and if statements, are not indented properly. This patch, written by Leo Liu, corrects the indentation problems.
2014-01-10fix indentation error from scan-sexp in erlang.elSteve Vinoski
Fix an indentation error being returned by scan-sexp, and add a new indentation test case for the error.