unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim Landscheidt <tim@tim-landscheidt.de>
To: help-gnu-emacs@gnu.org
Subject: Indentation of hashes (?) in perl-mode
Date: Wed, 19 Jun 2024 10:17:54 +0000	[thread overview]
Message-ID: <878qz1grsd.fsf@vagabond.tim-landscheidt.de> (raw)

Hi,

when writing anonymous subroutines for Find::File::find, I
get the following indentation with Emacs 29.3's perl-mode:

| find ({ wanted => sub {
|     return;
|         }, follow => 1 }, '/tmp');

IMHO it would seem more natural if the last line's opening
bracket was in the first column (i. e., no indentation).

A similar question was asked on Stack Exchange
(https://emacs.stackexchange.com/questions/78606/perl-mode-brace-indentation)
with the additional condition "without switching to
cperl-mode".

Is it possible to make perl-mode indent these structures
more naturally?  (I'm open to other ways to phrase this code
as well.)

TIA,
Tim



             reply	other threads:[~2024-06-19 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 10:17 Tim Landscheidt [this message]
2024-07-05 14:03 ` Indentation of hashes (?) in perl-mode Stefan Monnier via Users list for the GNU Emacs text editor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878qz1grsd.fsf@vagabond.tim-landscheidt.de \
    --to=tim@tim-landscheidt.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).