aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tools/emacs')
-rw-r--r--lib/tools/emacs/erlang.el9
-rw-r--r--lib/tools/emacs/test.erl.indented7
-rw-r--r--lib/tools/emacs/test.erl.orig5
3 files changed, 16 insertions, 5 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index f623e3a1ee..b352ae7cce 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -72,7 +72,7 @@
;; Variables:
-(defconst erlang-version "2.6.1"
+(defconst erlang-version "2.6.2"
"The version number of Erlang mode.")
(defvar erlang-root-dir nil
@@ -3792,9 +3792,9 @@ Value is list (stack token-start token-type in-what)."
;; Clause end
((= (following-char) ?\;)
- (if (and stack (and (eq (car (car stack)) 'when)
- (eq (car (car (cdr (cdr stack)))) 'spec)))
- (erlang-pop stack))
+ (if (eq (car (car (last stack))) 'spec)
+ (while (memq (car (car stack)) '(when ::))
+ (erlang-pop stack)))
(if (and stack (eq (car (car stack)) '->))
(erlang-pop stack))
(forward-char 1))
@@ -4946,6 +4946,7 @@ non-whitespace characters following the point on the current line."
(setq erlang-electric-newline-inhibit nil)
(setq erlang-electric-newline-inhibit t)
(undo-boundary)
+ (erlang-indent-line)
(end-of-line)
(newline)
(condition-case nil
diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented
index b2cc23b92b..1d91b2f155 100644
--- a/lib/tools/emacs/test.erl.indented
+++ b/lib/tools/emacs/test.erl.indented
@@ -110,6 +110,11 @@
(t24()) -> t24() when is_subtype(t24(), atom()),
is_subtype(t24(), t14()),
is_subtype(t24(), t4()).
+
+-spec over(I :: integer()) -> R1 :: foo:typen();
+ (A :: atom()) -> R2 :: foo:atomen();
+ (T :: tuple()) -> R3 :: bar:typen().
+
-spec mod:t2() -> any().
-opaque attributes_data() ::
[{'column', column()} | {'line', info_line()} |
@@ -359,7 +364,7 @@ indent_icr(Z) -> % icr = if case receive
X = 43 div 4,
foo(X)
end,
- receive
+ receive
{Z,_,_} ->
X = 43 div 4,
foo(X);
diff --git a/lib/tools/emacs/test.erl.orig b/lib/tools/emacs/test.erl.orig
index 773998a4c6..049fc21286 100644
--- a/lib/tools/emacs/test.erl.orig
+++ b/lib/tools/emacs/test.erl.orig
@@ -110,6 +110,11 @@ t15(),t20(),t21(), t22(),t25()}.
(t24()) -> t24() when is_subtype(t24(), atom()),
is_subtype(t24(), t14()),
is_subtype(t24(), t4()).
+
+-spec over(I :: integer()) -> R1 :: foo:typen();
+ (A :: atom()) -> R2 :: foo:atomen();
+ (T :: tuple()) -> R3 :: bar:typen().
+
-spec mod:t2() -> any().
-opaque attributes_data() ::
[{'column', column()} | {'line', info_line()} |