From 889208661105bf2e296c168ed0afa7452db137df Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 15 Dec 2009 13:38:58 +0100 Subject: Fixed indentation of -spec() -> Var :: type(); --- lib/tools/emacs/erlang.el | 8 ++++---- lib/tools/emacs/test.erl.indented | 5 +++++ lib/tools/emacs/test.erl.orig | 5 +++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index 6d6f9e24f4..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)) diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented index 6a4f0dd769..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()} | 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()} | -- cgit v1.2.3