aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/test.erl.indented
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-03-19 09:56:55 +0100
committerHenrik Nord <[email protected]>2014-03-19 09:57:06 +0100
commit14d1232bf4fba473772764fa7be0c385af642993 (patch)
tree2bef3a4b90d3b584bf9e467f96e42299be534d74 /lib/tools/emacs/test.erl.indented
parentd623f60a150e52f77491331529e172780dbc80ca (diff)
parent818628634b2c8e871fa3cf524c6659b0bea05c14 (diff)
downloadotp-14d1232bf4fba473772764fa7be0c385af642993.tar.gz
otp-14d1232bf4fba473772764fa7be0c385af642993.tar.bz2
otp-14d1232bf4fba473772764fa7be0c385af642993.zip
Merge branch 'vinoski/emacs-keyword-boundaries'
* vinoski/emacs-keyword-boundaries: match erlang keywords more carefully OTP-11786
Diffstat (limited to 'lib/tools/emacs/test.erl.indented')
-rw-r--r--lib/tools/emacs/test.erl.indented11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented
index 0dc1b47f0d..1c1086ca58 100644
--- a/lib/tools/emacs/test.erl.indented
+++ b/lib/tools/emacs/test.erl.indented
@@ -749,3 +749,14 @@ commas_first() ->
%% this used to result in a scan-sexp error
[{
}].
+
+%% this used to result in 2x the correct indentation within the function
+%% body, due to the function name being mistaken for a keyword
+catcher(N) ->
+ try generate_exception(N) of
+ Val -> {N, normal, Val}
+ catch
+ throw:X -> {N, caught, thrown, X};
+ exit:X -> {N, caught, exited, X};
+ error:X -> {N, caught, error, X}
+ end.