help-gnu-emacs
[Top][All Lists]
Advanced

[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 <nospam-abuse@ilyaz.org> skribis:
> [A complimentary Cc of this posting was sent to
> Daniel Pfeiffer 
> <occitan@esperanto.org>], who wrote in article 
> <20030211222108.11234512.occitan@esperanto.org>:
> > 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
remark.

> 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, make.pl...: --
   ------
    -- http://dapfy.bei.t-online.de/ --


reply via email to

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