[Top][All Lists]

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

Re: Is this a bug in cperl mode

From: Daniel Pfeiffer
Subject: Re: Is this a bug in cperl mode
Date: Mon, 17 Feb 2003 09:04:55 +0100

Ilya Zakharevich <address@hidden> skribis:
> [A complimentary Cc of this posting was sent to
> Daniel Pfeiffer 
> <address@hidden>], who wrote in article <address@hidden>:
> > Here is a little snippet of (wrong!) Perl code, which shows what is needed
> > to catch each of the font-lock errors:
> > \$"asd"
> > \$'asd'
> > \$`asd`
> $a = \$"->asd(\$");           # syntaxically correct

What are you trying to show?  Of course if by hasard the matching end
of construct is near, that corrects the situation.  But usually they
won't be near, unless it's a script written with your mode, where the
friendly programmer set things up that way.  (E.g. end of line comment
with whatever CPerl mode is expecting)

> > $opt_s!asd!bsd!
> This is OK with cperl-under-as-char TRUE.

Which is otherwise undesirable, as it breaks conventions Emacs users expect.
 But your other post yesterday suggests you have a solution-idea for that.

> > $opt::s!asd!bsd!
>   $opt::s = $foo = $bar =exe;  # Warnings, but no error

As above.

> > $opt{s}asd}bsd}
>   $opt{s} = ({asd => 1}, {bsd => 1});

As above again.

> > (s => ...)=bsd=
>   @a = (s => ...); $b = $bsd =exe;
> > The fourth case is the one originally posted here.  Both Ilya's and Emacs'
> > modes fall into precisely the same traps.
> Nope, the 4th one is OK with my version.

Not with SuSE 8.1's emacs -q --no-site-file (version 21.2) and M-x load-file
your cperl version.  I get the three "=" in light blue, "> ...); $b" in
light brown, "$bsd" in black and "exe" in green.  So again same as my first

> In my experience, the others
> appear much much rarer.

$opt{s} would be fairly common, and for giving it a default value @opt = (s => 

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- GPL 3: take the wind out of Palladium's sails! --
  -- My other stuff here too, sawfish, --
    -- --

reply via email to

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