in reply to Re^2: How has your coding style changed over the years?
in thread How has your coding style changed over the years?
could you please share your settings?
Sure! If you are using the "current" cperl-mode.el from git, you can do:
- Interactively: <M-x>cperl-set-style<RET>PBP<RET>
- In your Emacs config: (cperl-set-style "PBP")
- As customize option, file- or directory variable (which makes sense if you have different projects with different style requirements): Set cperl-file-style to "PBP"
For older versions of cperl-mode.el, here's the list of settings:
("PBP" ;; Perl Best Practices by Damian Conway (cperl-indent-level . 4) (cperl-brace-offset . 0) (cperl-continued-brace-offset . 0) (cperl-label-offset . -2) (cperl-continued-statement-offset . 4) (cperl-close-paren-offset . -4) (cperl-extra-newline-before-brace . nil) (cperl-extra-newline-before-brace-multiline . nil) (cperl-merge-trailing-else . nil) (cperl-indent-parens-as-block . t) (cperl-tab-always-indent . t))
In the end I stopped using perltidy
That reminds me of an issue "A command to run perltidy with the input from an emacs buffer" for which a first implementation never made it to Emacs....
In Section Meditations