File tree Expand file tree Collapse file tree 2 files changed +21
-7
lines changed
Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 271271 ((smie-rule-hanging-p )
272272 elixir-smie-indent-basic)))
273273
274+ ; ; Closing paren on the other line
275+ (`(:before . " (" )
276+ (smie-rule-parent ))
277+
274278 (`(:before . " ;" )
275279 (cond
276280 ((smie-rule-parent-p " after" " catch" " def" " defmodule" " defp" " do" " else"
277281 " fn" " if" " rescue" " try" " unless" )
278282 (smie-rule-parent elixir-smie-indent-basic))))
283+
279284 (`(:after . " ;" )
280- (if (smie-rule-parent-p " if" )
281- (smie-rule-parent )))))
285+ (cond
286+ ((smie-rule-parent-p " if" )
287+ (smie-rule-parent ))
288+
289+ ((and (smie-rule-parent-p " (" )
290+ (save-excursion
291+ (goto-char (cadr smie--parent))
292+ (smie-rule-hanging-p )))
293+ (smie-rule-parent elixir-smie-indent-basic))))))
282294
283295(define-minor-mode elixir-smie-mode
284296 " SMIE-based indentation and syntax for Elixir"
Original file line number Diff line number Diff line change @@ -523,12 +523,14 @@ end"
523523end" )
524524
525525(elixir-def-indentation-test indent-inside-parens
526- (:expected-result :failed )
527- " x = do_something(
528- :foo,
529- :bar
526+ (:tags '(indentation))
527+ "
528+ x = do_something(
529+ :foo,
530+ :bar
530531)"
531- " x = do_something(
532+ "
533+ x = do_something(
532534 :foo,
533535 :bar
534536)" )
You can’t perform that action at this time.
0 commit comments