Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > CPerl mode problem: syntax highlighting stumbles over my $old_z=3;my $old_y=4;

Reply
Thread Tools

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

 
 
shul
Guest
Posts: n/a
 
      02-06-2008
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:ld_x and $main:ld_y.

Thanks,
MItchell Laks
 
Reply With Quote
 
 
 
 
Ilya Zakharevich
Guest
Posts: n/a
 
      02-06-2008
[A complimentary Cc of this posting was sent to
shul
<(E-Mail Removed)>], who wrote in article <(E-Mail Removed)>:
> 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
 
Reply With Quote
 
 
 
 
OMouse
Guest
Posts: n/a
 
      02-06-2008
On Feb 5, 7:27 pm, shul <(E-Mail Removed)> wrote:
> 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
 
Reply With Quote
 
shul
Guest
Posts: n/a
 
      02-07-2008
On Feb 6, 4:28 pm, OMouse <(E-Mail Removed)> wrote:
> On Feb 5, 7:27 pm, shul <(E-Mail Removed)> wrote:
>
> > 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.


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 3.12 Where can I get perl-mode or cperl-mode for emacs? PerlFAQ Server Perl Misc 0 04-12-2011 10:00 PM
FAQ 3.12 Where can I get perl-mode or cperl-mode for emacs? PerlFAQ Server Perl Misc 1 01-08-2011 01:02 PM
cperl-indent-region: "No comment syntax is defined" David Combs Perl Misc 0 01-06-2007 02:58 AM
C++ programmer stumbles over pass by value. Need advice. Lenny Wintfeld Java 13 04-20-2006 06:27 PM
M-x cperl-indent-region: why error "no comment syntax is defined"? David Combs Perl Misc 0 04-04-2006 06:19 PM



Advertisments