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 232232 ((smie-rule-hanging-p )
233233 elixir-smie-indent-basic)))
234234
235+ ; ; Closing paren on the other line
236+ (`(:before . " (" )
237+ (smie-rule-parent ))
238+
235239 (`(:before . " ;" )
236240 (cond
237241 ((smie-rule-parent-p " after" " catch" " def" " defmodule" " defp" " do" " else"
238242 " fn" " if" " rescue" " try" " unless" )
239243 (smie-rule-parent elixir-smie-indent-basic))))
244+
240245 (`(:after . " ;" )
241- (if (smie-rule-parent-p " if" )
242- (smie-rule-parent )))))
246+ (cond
247+ ((smie-rule-parent-p " if" )
248+ (smie-rule-parent ))
249+
250+ ((and (smie-rule-parent-p " (" )
251+ (save-excursion
252+ (goto-char (cadr smie--parent))
253+ (smie-rule-hanging-p )))
254+ (smie-rule-parent elixir-smie-indent-basic))))))
243255
244256(define-minor-mode elixir-smie-mode
245257 " 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