[Top][All Lists]

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

Re: cperl indenting

From: Tim X
Subject: Re: cperl indenting
Date: Wed, 12 Jul 2006 19:07:23 +1000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

"Matt A." <address@hidden> writes:

> Hello all--
> i've recently started using emacs to edit perl in cperl-mode..  I'm having 
> horrible
> problems with the indentation schemes.  No matter what indentation style i 
> select,
> the results are totally unusable. 
> Emacs particularly likes to completely forget about indenting my code, 
> sending me
> to the beginning of the line after a newline.  ie:
> if($bar){
>      if($foo){
> #why is emacs sending me to the beginning of the line?
> $lame=1;
> }
> }
> help?

You are probably using emacs plain perl mode. Try doing M-x
cperl-mode. I think this is a much better perl mode. From memory, it
has several format/indent styles plus better integration with other
perl facilities. 

At one time there was some confusion regarding cperl version numbers 
the one which comes with emacs was numbered differently from the one
maintained by its author. Generally, you were better off running the
latest version maintained by the author. URL for the website etc
should be in the sources. Consider dates as well as version numbers
when comparing versions and go with the latest date if in doubt.

Also, don't overlook the emacs wiki for some useful tips on using
emacs to write perl. 


(note - its a while since I did much perl and used cperl regularly, so
I don't know how things may have moved on).

tcross (at) rapttech dot com dot au

reply via email to

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