]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Better C code formatting of arguments in Emacs
authorJörg Sommer <joerg@jo-so.de>
Thu, 28 Feb 2019 14:53:40 +0000 (15:53 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Feb 2019 15:50:53 +0000 (16:50 +0100)
In [PR#11696][1] it came up that the formatting of continued arguments should
follow the default Emacs style. To ensure this happens when someone has changed
his setting in her private config, the value should be set by *dir-locals.el*.

[1]: https://github.com/systemd/systemd/pull/11696#pullrequestreview-205463987

.dir-locals.el

index 676d7552312a748ff25f3758d98b265e0fc1cba0..815afe172a1e23c7464d12596c173825a0b3177a 100644 (file)
@@ -15,7 +15,8 @@
             (eval . (c-set-offset 'statement-case-open 0))
             (eval . (c-set-offset 'case-label 0))
             (eval . (c-set-offset 'arglist-intro '++))
-            (eval . (c-set-offset 'arglist-close 0))))
+            (eval . (c-set-offset 'arglist-close 0))
+            (eval . (c-set-offset 'arglist-cont-nonempty '(c-lineup-gcc-asm-reg c-lineup-arglist)))))
  (nxml-mode . ((nxml-child-indent . 2)
                (fill-column . 109)))
  (meson-mode . ((meson-indent-basic . 8)))