Quoth Rolf:
The OP is using a function which is not standard indenting, hitting TAB is.°

I quite categorically am using the standard indenting of cperl-mode. Copy the original example into a file called, say "test.pl", then edit with emacs -Q test.pl, and take the following sequence of instructions:

M-X cperl-mode C-SPC M-> M-C-\
gives me (copy-pasting from Emacs window):
my @headings = ( { key => 'k', name => 'Kanji', class => 'kanji'}, { key => 'skip', name => 'SKIP', class => 'skip-code'}, { key => 'co', name => 'Suggestion', class => 'skip-code'}, { key => 'disc', name => 'Discussion'}, );

The version of Emacs I am using is as follows:

GNU Emacs 27.1 (build 1, i386-portbld-freebsd12.1, GTK+ Version 3.24.2 +4, cairo version 1.16.0) Copyright (C) 2020 Free Software Foundation, Inc.

The cperl-mode is the default supplied with the above.


In reply to Re^7: How would you indent this? by no longer just digit
in thread How would you indent this? by no longer just digit

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.