File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 291291 (smie-rule-parent ))
292292 ; ; Closing paren on the other line
293293 (`(:before . " (" )
294- (smie-rule-parent ))
294+ (cond
295+ ((smie-rule-parent-p " fn" )
296+ (smie-rule-parent elixir-smie-indent-basic))
297+ (t (smie-rule-parent ))))
295298 (`(:before . " [" )
296299 (cond
297300 ((smie-rule-hanging-p )
Original file line number Diff line number Diff line change @@ -965,7 +965,6 @@ def foo(test) do
965965 run(test_case)
966966end" )
967967
968- ; ; Will pass when #180 is resolved.
969968(elixir-def-indentation-test indent-after-bitstring/1
970969 (:tags '(indentation))
971970"
@@ -981,6 +980,29 @@ defmodule X do
981980 def c, do: <<3 :: size(8)>>
982981end" )
983982
983+ (elixir-def-indentation-test indent-after-fn/1
984+ (:tags '(indentation))
985+ "
986+ defmodule X do
987+ def func do
988+ Enum.filter([1,2,3],
989+ fn(1) -> true
990+ (2) -> false
991+ (_) -> true
992+ end)
993+ end
994+ end"
995+ "
996+ defmodule X do
997+ def func do
998+ Enum.filter([1,2,3],
999+ fn(1) -> true
1000+ (2) -> false
1001+ (_) -> true
1002+ end)
1003+ end
1004+ end" )
1005+
9841006; ; We don't want automatic whitespace cleanup here because of the significant
9851007; ; whitespace after `Record' above. By setting `whitespace-action' to nil,
9861008; ; `whitespace-mode' won't automatically clean up trailing whitespace (in my
You can’t perform that action at this time.
0 commit comments