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

Discussion in 'Perl Misc' started by shul, Feb 6, 2008.

  1. shul

    shul Guest

    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
     
    shul, Feb 6, 2008
    #1
    1. Advertising

  2. [A complimentary Cc of this posting was sent to
    shul
    <>], who wrote in article <>:
    > 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
     
    Ilya Zakharevich, Feb 6, 2008
    #2
    1. Advertising

  3. shul

    OMouse Guest

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

    On Feb 5, 7:27 pm, shul <> 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
     
    OMouse, Feb 6, 2008
    #3
  4. shul

    shul Guest

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

    On Feb 6, 4:28 pm, OMouse <> wrote:
    > On Feb 5, 7:27 pm, shul <> 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
     
    shul, Feb 7, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lenny Wintfeld
    Replies:
    13
    Views:
    769
    Dimitri Maziuk
    Apr 20, 2006
  2. Mike Dowling

    cperl-mode and emacs-21.4 brocken?

    Mike Dowling, Feb 18, 2005, in forum: Perl Misc
    Replies:
    8
    Views:
    211
    Ilya Zakharevich
    Mar 9, 2005
  3. David Combs
    Replies:
    5
    Views:
    151
    Radomir Hejl
    Jun 13, 2005
  4. PerlFAQ Server
    Replies:
    1
    Views:
    198
    Marc Girod
    Jan 8, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    168
    PerlFAQ Server
    Apr 12, 2011
Loading...

Share This Page