help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indentation of hashes (?) in perl-mode


From: Tim Landscheidt
Subject: Indentation of hashes (?) in perl-mode
Date: Wed, 19 Jun 2024 10:17:54 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]