aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/test.erl.orig
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2012-06-25 12:21:07 +0200
committerHenrik Nord <[email protected]>2012-06-25 12:21:10 +0200
commit09110bd2afc87acdd26d57e52e8cdc9514e4fe81 (patch)
tree81ec907957f32a32a3e4c5c7c6328903afea96d0 /lib/tools/emacs/test.erl.orig
parenta03f32239b9598328aa1cc09c8926731a02716aa (diff)
parentad5f78aeaa4b33b6c3e8f50f0af2085d800765f6 (diff)
downloadotp-09110bd2afc87acdd26d57e52e8cdc9514e4fe81.tar.gz
otp-09110bd2afc87acdd26d57e52e8cdc9514e4fe81.tar.bz2
otp-09110bd2afc87acdd26d57e52e8cdc9514e4fe81.zip
Merge branch 'tab/fix-indentation-records-emacs' into maint
* tab/fix-indentation-records-emacs: Fix indentation of record fields in Emacs OTP-10120
Diffstat (limited to 'lib/tools/emacs/test.erl.orig')
-rw-r--r--lib/tools/emacs/test.erl.orig38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/tools/emacs/test.erl.orig b/lib/tools/emacs/test.erl.orig
index 1221c5655e..69356aca9e 100644
--- a/lib/tools/emacs/test.erl.orig
+++ b/lib/tools/emacs/test.erl.orig
@@ -657,3 +657,41 @@ ok.
foo() ->
[#foo{
foo = foo}].
+
+%% Record indentation
+some_function_with_a_very_long_name() ->
+ #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b},
+ case dummy_function_with_a_very_very_long_name(x) of
+ #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b} ->
+ ok;
+ Var = #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b} ->
+ Var#'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b};
+ #xyz{
+ a=1,
+ b=2} ->
+ ok
+ end.
+
+another_function_with_a_very_very_long_name() ->
+ #rec{
+ field1=1,
+ field2=1}.
+
+some_function_name_xyz(xyzzy, #some_record{
+ field1=Field1,
+ field2=Field2}) ->
+ SomeVariable = f(#'Some-long-record-name'{
+ field_a = 1,
+ 'inter-xyz-parameters' =
+ #'Some-other-very-long-record-name'{
+ field2 = Field1,
+ field2 = Field2}}),
+ {ok, SomeVariable}.