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

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

Can't format my Perl code properly with cperl-mode


From: Pustovoyt Alexander
Subject: Can't format my Perl code properly with cperl-mode
Date: Tue, 29 Oct 2013 12:57:35 +0400

   My problem is the same as the described in Emacs Wiki: Indenting Perl -
   Treating parentheses as blocks
   (http://www.emacswiki.org/emacs/IndentingPerl).

   е║

   I've got:

   е║

   sub _get_options

   {

   е║ return Getopt::Long::GetOptions(\%Options,

   е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║ qw(

   е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║ 
version|V

   е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║ )

   е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║е║ );

   }

   е║

   instead of desirable:

   е║

   sub _get_options

   {

   е║ return Getopt::Long::GetOptions(\%Options,

   е║е║е║ qw(

   е║е║е║е║е║ version|V

   е║е║е║ )

   е║ );

   }

   е║

   My ~/.emacs content is:

   е║

   (setq-default indent-tabs-mode nil)

   е║

   (defalias 'perl-mode 'cperl-mode)

   (setq-default

   е║cperl-indent-level 2

   е║cperl-indent-parens-as-block t

   е║cperl-tab-always-indent t

   е║cperl-continued-statement-offset 2

   е║cperl-continued-brace-offset -2

   е║cperl-close-paren-offset -2

   )

   е║

   е║

   I'm running GNU Emacs 24.3.1 with CPerl 6.2-Emacs.

   е║


reply via email to

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