From 55e80d74897ec16b80632fd7acdabdca764aea57 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 17 Dec 2009 16:56:25 +0100 Subject: More -spec indentation fixes. --- lib/tools/emacs/test.erl.indented | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lib/tools/emacs/test.erl.indented') diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented index 1d91b2f155..1a6292d90b 100644 --- a/lib/tools/emacs/test.erl.indented +++ b/lib/tools/emacs/test.erl.indented @@ -51,8 +51,10 @@ -type ann() :: Var :: integer(). -type ann2() :: Var :: - 'return' | 'return_white_spaces' | 'return_comments' - | 'text' | ann(). + 'return' + | 'return_white_spaces' + | 'return_comments' + | 'text' | ann(). -type paren() :: (ann2()). -type t1() :: atom(). @@ -116,6 +118,16 @@ (T :: tuple()) -> R3 :: bar:typen(). -spec mod:t2() -> any(). + +-spec handle_cast(Cast :: {'exchange', node(), [[name(),...]]} + | {'del_member', name(), pid()}, + #state{}) -> {'noreply', #state{}}. + +-spec handle_cast(Cast :: + {'exchange', node(), [[name(),...]]} + | {'del_member', name(), pid()}, + #state{}) -> {'noreply', #state{}}. + -opaque attributes_data() :: [{'column', column()} | {'line', info_line()} | {'text', string()}] | {line(),column()}. -- cgit v1.2.3 From 90312bd9c8fbbcc2974b0f0bccd772298bd5d37c Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 18 Dec 2009 13:03:24 +0100 Subject: Emacs: Added indentation inside parenthesis 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), --- lib/tools/emacs/test.erl.indented | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'lib/tools/emacs/test.erl.indented') diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented index 1a6292d90b..1ccced9177 100644 --- a/lib/tools/emacs/test.erl.indented +++ b/lib/tools/emacs/test.erl.indented @@ -44,6 +44,24 @@ b }). +-record(record3, {a = 8#42423 bor + 8#4234, + b = 8#5432 + bor 2#1010101 + c = 123 + + 234, + d}). + +-record(record4, { + a = 8#42423 bor + 8#4234, + b = 8#5432 + bor 2#1010101 + c = 123 + + 234, + d}). + + -define(MACRO_1, macro). -define(MACRO_2(_), macro). @@ -91,7 +109,7 @@ fun((nonempty_maybe_improper_list('integer', any())| 1|2|3|a|b|<<_:3,_:_*14>>|integer()) -> nonempty_maybe_improper_list('integer', any())| - 1|2|3|a|b|<<_:3,_:_*14>>|integer()). + 1|2|3|a|b|<<_:3,_:_*14>>|integer()). -type t20() :: [t19(), ...]. -type t21() :: tuple(). -type t21(A) :: A. @@ -121,12 +139,18 @@ -spec handle_cast(Cast :: {'exchange', node(), [[name(),...]]} | {'del_member', name(), pid()}, - #state{}) -> {'noreply', #state{}}. + #state{}) -> {'noreply', #state{}}. -spec handle_cast(Cast :: {'exchange', node(), [[name(),...]]} | {'del_member', name(), pid()}, - #state{}) -> {'noreply', #state{}}. + #state{}) -> {'noreply', #state{}}. + + +-spec get_closest_pid(term()) -> + Return :: pid() + | {'error', {'no_process', term()} + | {'no_such_group', term()}}. -opaque attributes_data() :: [{'column', column()} | {'line', info_line()} | @@ -294,7 +318,10 @@ indent_basics(X, Y, Z) c ), - + call(2#42423 bor + #4234, + 2#5432, + other_arg), ok; indent_basics(Xlongname, #struct{a=Foo, @@ -508,7 +535,7 @@ indent_catch() -> B = catch oskar(X), A = catch (baz + - bax), + bax), catch foo(), C = catch B + -- cgit v1.2.3