[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is this a bug in cperl mode
From: |
Harry Putnam |
Subject: |
Is this a bug in cperl mode |
Date: |
Mon, 10 Feb 2003 03:20:28 GMT |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
I get several kinds of goofy behavior from cperl mode on this snippet
of code. The syntax hylight breaks down on last section too. Makes
cperl pretty useless for what its designed for. Maybe its local guff
causing it but starting emacs -q -no-site-file doesn't seem to help.
And perl, even in strict mode, has no problem with it.
emacs perl-mode doesn't complain either.
In cperl-mode:
Try C-x h C-M \ on this code or just navigate around in it,
particularly at if($opt_s).
#!/usr/local/bin/perl -w
use strict;
use vars qw($opt_d $opt_s);
use Getopt::Std;
my $optstr ="ds";
getopts($optstr);
if($opt_d){
print "an -d was used\n";
}
if($opt_s){
print "an -s was used\n";
}