jed-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

RE: perl mode indentation


> I'm really after keeping the brace/bracket on the same line as the
> parenthesis in the function call and having the arguments on the next
> line
> indent 4 spaces, instead of all the way under the opening brace. The
> type
> of brace usually happens to be a hash reference for me, but it could
> also
> be an array or subroutine reference.

Would mean any brace/square bracket immediately following a round one should
be indented to the Perl_Indent instead of the parenthesis?

Eg, 
@list = ([{
 ...
}]);

@list = ([{
    foo => 'bar'
}, 0, 1 ]);

> newest cperl mode for emacs and saw that it was able to do what I
> describe.
> That's the only reason I brought it up.  No big deal though :)

Maybe you can take a look at how the cperl mode is doing it and (provided
you can decipher the lisp) we can see about adding into the jed mode.

> Thanks for the tip about the perltidy binding.  I've been doing it the
> hardway and running it from the command line.

Then you'll be glad to know that the perltidy binding also works on regions.
Perltidy, and other useful functions (perldoc, perl_exec, etc.) are in
perlxtra, which allows you to bind them to the global keymap if desired or
invoke them via M-x for any mode.
This can useful, for example, if you have Perl code embedded within a shell
script and need to re-indent the Perl section.

> I found that if you add
> -fnl    # do not want any changes to the line breaks

I mostly just let perltidy take charge. 
 
> As far as protyping all my functions, I don't want to go down that
> road just to
> get the right spacing.

No, I didn't mean prototyping the functions, just having their declarations
seen before their invocation.

/mark

This e-mail message and any attachments may contain legally privileged, confidential or proprietary Information, or information otherwise protected by law of ArvinMeritor, Inc., its affiliates, or third parties. This notice serves as marking of its ?Confidential? status as defined in any confidentiality agreements concerning the sender and recipient. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.



--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]