* cperl indenting
@ 2006-07-11 15:21 Matt A.
0 siblings, 0 replies; 3+ messages in thread
From: Matt A. @ 2006-07-11 15:21 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 451 bytes --]
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?
[-- Attachment #1.2: Type: text/html, Size: 533 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cperl indenting
[not found] <mailman.3972.1152631295.9609.help-gnu-emacs@gnu.org>
@ 2006-07-11 15:58 ` Markus Triska
2006-07-12 9:07 ` Tim X
1 sibling, 0 replies; 3+ messages in thread
From: Markus Triska @ 2006-07-11 15:58 UTC (permalink / raw)
"Matt A." <flapphead@yahoo.com> writes:
>
> help?
Probably you need:
(global-set-key "\C-m" 'newline-and-indent)
in .emacs?
All the best,
Markus.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cperl indenting
[not found] <mailman.3972.1152631295.9609.help-gnu-emacs@gnu.org>
2006-07-11 15:58 ` cperl indenting Markus Triska
@ 2006-07-12 9:07 ` Tim X
1 sibling, 0 replies; 3+ messages in thread
From: Tim X @ 2006-07-12 9:07 UTC (permalink / raw)
"Matt A." <flapphead@yahoo.com> 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. http://www.emacswiki.org
Tim
(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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-12 9:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3972.1152631295.9609.help-gnu-emacs@gnu.org>
2006-07-11 15:58 ` cperl indenting Markus Triska
2006-07-12 9:07 ` Tim X
2006-07-11 15:21 Matt A.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).