aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang.el
AgeCommit message (Collapse)Author
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-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-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-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.
2014-01-10Remove support for query keyword from emacs modePaul Oliver
2014-01-07prevent errors from erlang.elSteve Vinoski
In erlang.el, add a line to evaluate the cl package at compile time so that the use of the block macro (such as on line 3750), which is an alias for cl-block, is evaluated correctly when erlang.el is compiled. Also modify comparisons against (point) in functions erlang-electric-lt and erlang-after-bitsyntax-close so that typing the characters '<' and '>' (without the quotes) at the beginning of a buffer does not cause errors. Thanks to user leo2007 in the #erlang channel on IRC for reporting these problems and providing fixes.
2013-12-20fix erlang-mode erlang-get-function-aritySteve Vinoski
In the emacs erlang-mode the function erlang-get-function-arity failed to return a correct arity value for functions with literal binaries as parameters, for example: function(<<Bin:20/binary>>) -> Bin. Fix erlang-get-function-arity to recognize binary parameters correctly.
2013-12-12Support EEP37 named funs in emacs erlang-modeSteve Vinoski
Change emacs erlang-mode to recognize EEP37 named funs so they're indented properly. Specifically, modify erlang-partial-parse to allow for an optional Erlang variable name to appear between the "fun" keyword and the opening parenthesis of its argument list.
2013-10-25Merge branch 'puzza007/emacs_iodata_nonempty_string_builtin_types/OTP-11394' ↵Fredrik Gustafsson
into maint * puzza007/emacs_iodata_nonempty_string_builtin_types/OTP-11394: Add iodata, nonempty_string to built-in type highlighting for emacs
2013-10-10Add iodata, nonempty_string to built-in type highlighting for emacsPaul Oliver
These built-in types were missing from emacs highlighting
2013-09-12Remove ^L characters hidden randomly in the code. Not those used in text ↵Pierre Fenoll
files as delimiters. While working on a tool that processes Erlang code and testing it against this repo, I found out about those little sneaky 0xff. I thought it may be of help to other people build such tools to remove non-conforming-to-standard characters.
2013-08-27tools:Fredrik Gustafsson
In Emacs it is possible to remotely edit a file, by opening for example /ssh:somehost.com:/path/to/file.erl. In Emacs, the feature that makes this possible, is called TRAMP. When compiling such a file, by typing C-c C-k, an inferior Erlang shell is opened on the remote host, but the compilation expression that was evaluated in the remote Erlang shell was: c("/ssh:somehost.com:/path/to/file", [...]). which resulted in a "no such file or directory" error. This commit changes the compilation expression into: c("/path/to/file", [...]). for files opened remotely via TRAMP. The file name is adjusted similarly when compiling .yrl and .xrl files. In a buffer opened remotely, the Elisp function buffer-file-name returns the full path with TRAMP syntax. In this example it would be "/ssh:somehost.com:/path/to/file.erl". A new function, erlang-local-buffer-file-name, has been introduced, which peels off the TRAMP syntax on remotely opened files, while for locally opened files, it just calls buffer-file-name.
2013-06-18Inside parentheses, line-initial commas align with the open parenthesisMagnus Henoch
For example: [ one , two , three ] This does not affect coding styles that don't put commas at the beginning of lines.
2013-06-04tools: Added gather_gc_info_result to bifsFredrik Gustafsson
2013-02-14Add float_to_binary and binary_to_floatLukas Larsson
2013-02-14Add new binary conversion bifsLukas Larsson
Added: binary_to_integer/1,2, integer_to_binary/1,2
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Merge branch 'lukas/tools/emacs_add_error_bif/OTP-10774'Lukas Larsson
* lukas/tools/emacs_add_error_bif/OTP-10774: Update all bif highlighting for emacs
2013-01-24Fix syntax highlighting of $\' in Emacs modeMagnus Henoch
The single quote in $\' does not begin an atom. Change the regexp to treat it just like $\". Previously this code would be incorrectly highlighted: foo() -> Quote = $\', %% This gets coloured as an atom, not as a comment ...
2013-01-21Update all bif highlighting for emacsLukas Larsson
All bifs should now be highlighted correctly. Also added a testcase which will check for any future bif additions and deletions.
2012-10-29Add separate face for exported functionsThomas Järvstrand
Add a separate face for exported functions to erlang mode so that they are distiguishable at a glance. By default, the face is identical to that of normal functions and there is also a configuration variable to inhibit the face in case running this on a low-performance machine is too slow.
2012-10-03Merge branch 'gp/make_erlang_mode_elpa_friendly'Henrik Nord
* gp/make_erlang_mode_elpa_friendly: Make erlang-mode more compatible with package.el OTP-10465
2012-08-31Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: lib/diameter/autoconf/vxworks/sed.general xcomp/README.md
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-13Merge branch 'maint'Fredrik Gustafsson
2012-08-07Fix highlighting of atoms ending with a dollar signMagnus Henoch
Like this: 'atom$'. In that example, the last single quote should be recognised as ending the atom. This needs a font-lock workaround similar to the one for strings.
2012-08-01Merge branch 'mh/remove-compilation-error-regexp'Henrik Nord
* mh/remove-compilation-error-regexp: Remove Erlang-specific compilation error regexp OTP-10168
2012-06-12Fix indentation of record fields in EmacsTomas Abrahamsson
In some situations, the indentation of record fields in Emacs was strange. This example below shows how Emacs previously would indent two similar pieces of code very differently: some_function_with_a_very_long_name() -> #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{ field1=a, field2=b}. x() -> #some_record_name{ field1=a, field2=b}. This changes the indentation to be like below for both cases: some_function() -> #some_record{ field1=a, field2=b}.
2012-06-08Remove Erlang-specific compilation error regexpMagnus Henoch
The purpose of this regexp is to ensure that, when invoking the Erlang compiler inside Emacs through M-x compile, any error messages be turned into links jumping to the right line in the right source file. However, it seems like this works out of the box in modern Emacsen, and furthermore, using a non-standard regexp inhibits jumping to a certain column when this is provided by the compiler.
2012-02-14Make erlang-mode more compatible with package.elGleb Peregud
Package.el and Emacs package repositories (like ELPA or Marmalade place some requirements onto packages which are uploaded to them. This commit does minor cosmetic changes which makes it easier to create appropriate package file for those repositories.
2011-09-15Fix misspelling of compatibilityTuncer Ayaz
2011-08-30Teach the emacs mode to compile yecc and leex filesTomas Abrahamsson
If visiting a .yrl or .xrl file in emacs with erlang-mode, then the `erlang-compile' function (normally bound to C-c C-k), now knows how to compile yecc and leex files, and then, if that compilation succeeds, also compiles the resulting .erl files. Also introduce a `erlang-compile-command-function-alist' to make it possible to hook in other functions for computing compilation commands/expressions, depending on file name.
2011-04-15Inhibit electric newline after "->" when inside a type specMagnus Henoch
The Erlang mode for Emacs inserts a newline after every "->", which saves you one keystroke when writing a function, but that is inappropriate when writing a type spec, as you'd normally keep the spec on one line. This change inhibits the automatic insertion when the current line starts with "-spec" or "-type".
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-09Declare indentation options as "safe" in erlang-mode for EmacsMagnus Henoch
Emacs has a facility for setting options on a per-file basis based on comments in the source file. By default, all options are considered "unsafe", and the user is queried before the variable is set. This patch declares the variables erlang-indent-level, erlang-indent-guard and erlang-argument-indent to be safe, if the value specified in the source file is valid. Such declarations usually look like this: %% -*- erlang-indent-level: 2 -*- and appear on the first line of the file.
2010-09-30Emacs erlang-mode: fix syntax highlighting of $ in two casesMagnus Henoch
A string whose last character is a dollar sign used to make the syntax highlighter believe that the string never ends, breaking highlighting of following code: -vsn("$Revision: 42 $"). And the double quote as a character constant with a (superfluous) backslash used to make the syntax highlighter believe that a new string started: foo() -> $\". This change fixes both problems by adding two regexps to font-lock-syntactic-keywords in erlang-font-lock-init. One case that is still broken is when a multi-line string ends with a dollar sign: bar() -> "This multi-line string ends with a $". baz() -> this_gets_incorrectly_highlighted.
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-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