diff options
author | Noah Misch <noah@leadboat.com> | 2019-01-13 11:32:31 -0800 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2019-01-13 11:32:31 -0800 |
commit | 472e1e4cf64b81b1ecae900db8115deb250ba8bc (patch) | |
tree | 8286d61f9f2528cb5fe9b455634017b5ba09aa67 /src | |
parent | 52a301e0d95aa25aa9bbc0eefd1167458e3e0cab (diff) | |
download | postgresql-472e1e4cf64b81b1ecae900db8115deb250ba8bc.tar.gz postgresql-472e1e4cf64b81b1ecae900db8115deb250ba8bc.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/editors/emacs.samples | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/editors/emacs.samples b/src/tools/editors/emacs.samples index a7152b04bc9..529c98a9eba 100644 --- a/src/tools/editors/emacs.samples +++ b/src/tools/editors/emacs.samples @@ -47,10 +47,13 @@ (interactive) (setq perl-brace-imaginary-offset 0) (setq perl-brace-offset 0) - (setq perl-continued-brace-offset 4) (setq perl-continued-statement-offset 2) + (setq perl-continued-brace-offset (- perl-continued-statement-offset)) (setq perl-indent-level 4) (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 tab-width 4)) |