jrockway / cperl-mode

cperl-mode with 5.10 fixes, mx-declare support, perl6 support, etc.
102 stars 33 forks source link

How to set cperl-mode to indent parens as block #14

Closed cnd closed 7 years ago

cnd commented 11 years ago

Hello I want to write code blocks alike following:

xxx {
  yyy
  }

I saw this

(defcustom cperl-indent-parens-as-block nil
  "*Non-nil means that non-block ()-, {}- and []-groups are indented as blocks,
but for trailing \",\" inside the group, which won't increase indentation.
One should tune up `cperl-close-paren-offset' as well."
  :type 'boolean
  :group 'cperl-indentation-details)

And was trying to add this:

(setq cperl-indent-parens-as-block t)

https://github.com/Cynede/emacs.d/commit/a93298c882dbd5170636df7c7e53711bb1b94ba0

I expected it will indent closing block bracket but it doesn't. And I can't detect any other changes.

When I set

(defcustom cperl-indent-parens-as-block t
    ...

in code it doesn't indent closing block bracket too.

CeleritasCelery commented 7 years ago

https://www.emacswiki.org/emacs/IndentingPerl

cnd commented 7 years ago

sorry, outdated =)