Re: Indentation (was Re: invalid installdirs values)

[email protected] ("David E. Wheeler")
Newsgroups perl.module.build
Message-ID <[email protected]>
On Sep 28, 2008, at 11:18, Michael G Schwern wrote:

> Ken Williams wrote:
>> So, 2-char column indents is right out?  That's what most of the code
>> is using now, because it's the default default for cperl-mode,  
>> which I
>> use.  I'd like to keep that unless it's going to make everyone jump
>> infrontof trains.
>
> If that's the only reason you're using 2-character tabs, and if  
> anyone is
> going to define coding style it is not Ilya, I will happily provide  
> you with a
> new cperl configuration!
>
> (setq indent-tabs-mode nil)
>
> (require 'cperl-mode)
> (setq cperl-indent-level 4)
> (setq cperl-label-offset 0)
> (setq cperl-continued-statement-offset 2)

For _PBP_ compliance, this should be 4.

> (setq cperl-close-paren-offset -4)

FWIW, my settings:

(setq-default indent-tabs-mode nil)

(setq cperl-hairy t)
(setq cperl-electric-keywords t)
(setq cperl-highlight-variables-indiscriminately t)

(custom-set-variables
  '(cperl-close-paren-offset -4)
  '(cperl-continued-statement-offset 4)
  '(cperl-indent-level 4)
  '(cperl-indent-parens-as-block t)
  '(cperl-label-offset 0)
  '(cperl-merge-trailing-else nil)
  '(cperl-tab-always-indent t))

> If the argument is "that's what emacs defaults to so we shouldn't  
> rock the
> boat", looking at all the ratio of 2 to 4 character indent code out  
> there I
> think the boat is sufficiently rocked.

Agreed. I'm fine with 2 spaces…when I program Ruby. That's because  
it's the Ruby community style to use 2 spaces. The Perl community  
style, however, is 4. So that's what I urge.

Most important, though, is eliminating the tabs.

Best,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.