mirror of
https://github.com/postgres/postgres.git
synced 2025-04-20 00:42:27 +03:00
Make Emacs perl-mode indent more like perltidy.
This especially helps braces that surround code blocks. Back-patch to v11, where commit 56fb890ace8ac0ca955ae0803c580c2074f876f6 first appeared; before that, settings were even more distant from perltidy. Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20190103055355.GB267595@gust.leadboat.com
This commit is contained in:
parent
52a301e0d9
commit
472e1e4cf6
@ -9,7 +9,7 @@
|
|||||||
(indent-tabs-mode . nil)))
|
(indent-tabs-mode . nil)))
|
||||||
(perl-mode . ((perl-indent-level . 4)
|
(perl-mode . ((perl-indent-level . 4)
|
||||||
(perl-continued-statement-offset . 2)
|
(perl-continued-statement-offset . 2)
|
||||||
(perl-continued-brace-offset . 4)
|
(perl-continued-brace-offset . -2)
|
||||||
(perl-brace-offset . 0)
|
(perl-brace-offset . 0)
|
||||||
(perl-brace-imaginary-offset . 0)
|
(perl-brace-imaginary-offset . 0)
|
||||||
(perl-label-offset . -2)
|
(perl-label-offset . -2)
|
||||||
|
@ -47,10 +47,13 @@
|
|||||||
(interactive)
|
(interactive)
|
||||||
(setq perl-brace-imaginary-offset 0)
|
(setq perl-brace-imaginary-offset 0)
|
||||||
(setq perl-brace-offset 0)
|
(setq perl-brace-offset 0)
|
||||||
(setq perl-continued-brace-offset 4)
|
|
||||||
(setq perl-continued-statement-offset 2)
|
(setq perl-continued-statement-offset 2)
|
||||||
|
(setq perl-continued-brace-offset (- perl-continued-statement-offset))
|
||||||
(setq perl-indent-level 4)
|
(setq perl-indent-level 4)
|
||||||
(setq perl-label-offset -2)
|
(setq perl-label-offset -2)
|
||||||
|
;; Next two aren't marked safe-local-variable, so .dir-locals.el omits them.
|
||||||
|
(setq perl-indent-continued-arguments 4)
|
||||||
|
(setq perl-indent-parens-as-block t)
|
||||||
(setq indent-tabs-mode t)
|
(setq indent-tabs-mode t)
|
||||||
(setq tab-width 4))
|
(setq tab-width 4))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user