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

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

Re: cperl-mode


From: LanX
Subject: Re: cperl-mode
Date: Wed, 08 Dec 2010 15:09:57 -0000
User-agent: G2/1.0

> OK, thanks for the heads up. I am still an Emacs newbie, and thought I
> was missing something.

The only thing that you were missing is that Terrence aka Metaperl aka
Princepawn seems far to cool for a serious discussion.

People are trying here to figure out what he exactly wants in this
thread simply named cperl-mode.

Is it the line indentation in a multiline hash literal ???

Or is it the alignment of the fat comma ("=>") ???

cperl-set-style doesn't affect any of these, you have to look into the
documentation or try them out to see it.

And IMHO J.Rockway is just publishing a fork to support modules like
Moose and Devel::REPL, he is not the new maintainer.

Don't know if this "splitted personality" really intends to be a
troll, but he certainly has a talent in spreading confusion.
(just go to perlmonks and look at his list of worst posts)

So better ignore him as long he doesn't posts precise informations, if
you don't wanna waste your time.

(seems like that is what Ilya actually does)


Now, to give this discussion a productive turn here is the part of
cperl-mode.el  which IMHO affects the line indentation:

----------
         ((eq 'in-parens (elt i 0))
          ;; in-parens char-after old-indent-point is-brace containing-sexp

          ;; group is an expression, not a block:
          ;; indent to just after the surrounding open parens,
          ;; skip blanks if we do not close the expression.
          (+ (progn
               (goto-char (elt i 2))            ; old-indent-point
               (current-column))
             (if (and (elt i 3)         ; is-brace
                      (eq (elt i 1) ?\})) ; char-after
                 ;; Correct indentation of trailing ?\}
                 (+ cperl-indent-level cperl-close-paren-offset)
               0)))
--------

Would be nice if Ilya (or someone else) could add a new  option to not
indent after surrounding parens, I have only limited resources to do
it right now.

for the moment an extra newline is the best workaround for a dense
indentation.

------------
my %default =
  (
   amount        => 0,
   balance       => 0,
   total_items   => 0,
   trade_disc    => 0,
   debit         => 1
  );
-------------

cheers
  rolf


reply via email to

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