in reply to Re^2: How would you indent this? (cperl-indent-region)
in thread How would you indent this?
From my experience does cperl not attempt to format nested data structures
It shouldn't, but it does. As you suspect, CPerl mode mistakes the nested data structure as a control structure, which it reformats intentionally (see example here). It just takes a wrong turn in the function cperl-fix-line-spacing. Therefore, it is rather obvious that the issue doesn't occur with arrays: square brackets can't be confused with control structures.
If you want M-x cperl-indent-region and M-x cperl-indent-exp to do indentation and nothing else, set cperl-indent-region-fix-constructs to nil.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How would you indent this? (cperl-indent-region)
by LanX (Saint) on Mar 18, 2021 at 18:52 UTC |