unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Indentation of hashes (?) in perl-mode
@ 2024-06-19 10:17 Tim Landscheidt
  2024-07-05 14:03 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Landscheidt @ 2024-06-19 10:17 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-05 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 10:17 Indentation of hashes (?) in perl-mode Tim Landscheidt
2024-07-05 14:03 ` Stefan Monnier via Users list for the GNU Emacs text editor

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).