Skip to content

Commit

Permalink
Fix indentation of list arguments
Browse files Browse the repository at this point in the history
References #21
  • Loading branch information
wentasah committed Aug 20, 2021
1 parent 7932e7a commit 1a2e2ab
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
11 changes: 5 additions & 6 deletions meson-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -887,12 +887,11 @@ arguments."
(`(:list-intro . ,(or "eol" ":" "")) t) ; "" is actually "[" because that's what lexer returns
(`(:after . ":") meson-indent-basic)
(`(:after . ,(or "=" "+=")) meson-indent-basic)
(`(:before . ,(or "[" "{")) (if (smie-rule-hanging-p) (smie-rule-parent)))
(`(:before . "(") (if (smie-rule-hanging-p)
(save-excursion
(smie-backward-sexp 'halfsexp) ; goto parent
(beginning-of-line-text)
(cons 'column (current-column)))))
(`(:before . ,(or "[" "(" "{")) (if (smie-rule-hanging-p)
(save-excursion
(smie-backward-sexp 'halfsexp) ; goto parent
(beginning-of-line-text)
(cons 'column (current-column)))))
(`(:after . ,(or "[" "(" "{")) meson-indent-basic)
(`(:before . "elif") (smie-rule-parent))
(_ nil)))
Expand Down
22 changes: 22 additions & 0 deletions test/indent
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,28 @@ dist = {
'iirflt' : 5,
}

foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] +
(conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : []))
meson.add_install_script(meson_make_symlink,
join_paths(rootbindir, 'systemctl'),
join_paths(rootsbindir, alias))
endforeach

sources = files([
'aaa/a1.c',
'aaa/a2.c',
'bbb/subdir1/b1.c',
'bbb/subdir2/b2.c',
'bbb/subdir10/b3.c',
'bbb/subdir20/b4.c',
'bbb/b5.c',
'bbb/b6.c',
'f1.c',
'f2.c',
'f10.c',
'f20.c'
])

# Local Variables:
# mode: meson
# End:

0 comments on commit 1a2e2ab

Please sign in to comment.