[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CPerl Indentation after subs with print in their names
From: |
Stefan Kamphausen |
Subject: |
CPerl Indentation after subs with print in their names |
Date: |
Thu, 22 Nov 2007 17:43:06 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi,
today I came across a subtle mis-indentation in Perl-code. Assume a
file like this:
----------------------------------------------------------------------
#! /usr/bin/perl
use strict;
use warnings;
sub anything {
print "OK\n";
}
# here indentation is OK
sub print_something {
print "Something\n";
}
# but here not ??
----------------------------------------------------------------------
If I remove the "print_" from the the name of the subroutine
everything indents correctly. I tried a few other special words from
the Perl language:
Function Indentation
printf wrong
while OK
sprintf OK
substr OK
open OK
This happens with:
Gnu Emacs 22.1.1, cperl-version 5.22.
Steps to reproduce:
shell> emacs -q test.pl
emacs> M-x cperl-mode
emacs> M-x goto-line 12 ;; the line # but here not ??
emacs> TAB
Is this a bug or some stupidity on my part?
Regards,
Stefan
--
Stefan Kamphausen --- http://www.skamphausen.de
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
- CPerl Indentation after subs with print in their names,
Stefan Kamphausen <=
- Re: CPerl Indentation after subs with print in their names, Ilya Zakharevich, 2007/11/23
- Re: CPerl Indentation after subs with print in their names, Stefan Kamphausen, 2007/11/23
- Re: CPerl Indentation after subs with print in their names, Ilya Zakharevich, 2007/11/23
- Re: CPerl Indentation after subs with print in their names, Stefan Kamphausen, 2007/11/26
- Re: CPerl Indentation after subs with print in their names, Ilya Zakharevich, 2007/11/26
- Re: CPerl Indentation after subs with print in their names, Stefan Kamphausen, 2007/11/27
- Re: CPerl Indentation after subs with print in their names, Tim X, 2007/11/28