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

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

Re: perl mode


From: Stefan Monnier
Subject: Re: perl mode
Date: Thu, 03 Oct 2013 22:46:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> #!/usr/bin/perl -w
> use strict;
> $\ = "\n";
> my $txt = 'Hello World !';
> main
> {
> if(1)
> {
> ($txt =~ m/Hello /) && (print "$'");
> }
> print "Bye";
> }
> exit(0);

> If I run the "indent-region" command (after having marked the whole
> script", identation is not correct.

As far as I can tell, the only problem is that perl-mode doesn't like to
start from a file with no indentation at all.  Check `perl-nochange',
which is a regexp that specifies lines that auto-indentation should
not change.  This includes all lines that start with ( or { or [.


        Stefan



reply via email to

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