CPerl mode problem: syntax highlighting stumbles over my $old_z=3;my $old_y=4;

S

shul

Hi I am using
emacs GNU Emacs 21.4.1, with CPerl mode enabled.
on debian sid.

I am writing a gtk2-pel program and I noticed that CPerl goes crazy
with the syntax highling
going off, and also the indenting C-M--\ not working for a few lines
if I use variables like

my my $old_z=3;
my $old_y = 4;

....
some more lines of code
....

the second line shows the 4 in a funny color
an dthen the next couple of lines get a "greyed out look",
and when I try to indent it leaves the next lines pushed to the left
margin.

All goes back to normal if I do

my $oldx = 3;
my $oldy = 4;
instead.

Why is this. Same with $main::eek:ld_x and $main::eek:ld_y.

Thanks,
MItchell Laks
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
shul
my $old_z=3;
my $old_y = 4;

...
some more lines of code
...

the second line shows the 4 in a funny color

RMS Emacs comes with a modified version of CPerl which is, more or
less, unusable.

Hope this helps,
Ilya
 
O

OMouse

Hi I am using
emacs GNU Emacs 21.4.1, with CPerl mode enabled.
on debian sid.

Try upgrading to GNU Emacs 22.x or at least try to grab the latest
version of CPerl mode.

Could you please paste some more lines of code as an example? I tried
the ones shown and I had no problem with it.

-Rudolf
 
S

shul

Try upgrading to GNU Emacs 22.x or at least try to grab the latest
version of CPerl mode.

Thank you, I did the upgrade and the problem is gone.
Could you please paste some more lines of code as an example? I tried
the ones shown and I had no problem with it.

Thank you - that was precisely the code. Just 2 lines containing
variable names
$old_x and $old_y messed up the syntax highlighting for about 5 lines.

I also googled around some more last night and found earlier reports
of this and instructions on how to modify
the old .el file to fix this. As Ilya says there were some unfortunate
modifications of the cperl.el file.
The modifications considered _ in a variable name as some kind of
punctuation or something (it was over my head :)).

Anyway it is ok in emacs22.1.1 on my machine now. YAY!
thank you (I thought I was running up to date sid! shows you how out
of date I was!).

Thank you,

Mitchell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top