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

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

Tab stops in perl mode broken?


From: Johnny L. Wales
Subject: Tab stops in perl mode broken?
Date: Tue, 20 May 2003 15:12:05 -0500 (CDT)

address@hidden PhoneStats]# emacs --version 
GNU Emacs 21.2.1 Copyright (C)

Ok, I have this astonishingly annoying problem in perl mode. I can't get
proper indention on some lines. Check this out:

------------
if(defined($rqpairs{'area'})) {
    print "Content-type: text/html\n\n";
    print "<html>";
    print "<head><title>Canvassing report: $rqpairs{'area'}</title></head>\n";
    print "<body bgcolor=white>";
    print "Canvassing report for $rqpairs{'area'}<br>";

    $dbcmd = "SELECT count(*) FROM calls WHERE ( (outgoingnum like ";
    $dbcmd .= "'P1$rqpairs{'area'}%') OR (outgoingnum like 'P0";
    $dbcmd .= "$rqpairs{'area'}\%')) ";
    ($year, $month, $day) = Date::Calc::Today();
($o_year, $o_month, $o_day) = Date::Calc::Add_Delta_Days($year, $month,
$day, -\
30);
$dstr = sprintf("'%04d-%02d-%02d' AND '%04d-%02d-%02d'",
                $o_year, $o_month, $o_day, $year, $month, $day);
$dbcmd .= "AND (calldate between $dstr) ORDER BY calldate;";
$sth = $dbh -> prepare($dbcmd);
$sth->execute;
$count = $sth->fetchrow_array;
---------

Now, notice how the indention changes unexpectedly after the line 
    ($year, $month, $day) = Date::Calc::Today();

This is also the first line where the :: notation is used. Is emacs unable
to understand this _extremely_ common notation? How can I make it
understand? (Note that vi understands just fine and will tab this file
easily.. but I think any editor that defaults to opening files read-only
is a viewer, not an editor. ;)

Further, is there some command like:
M-x when-i-say-tab-i-mean-tab-damn-it

that will make emacs ALWAYS add a tab when I hit the tab button, whether
it seems reasonable to emacs or not? I've also yet to be able to find an
easy way to set tab width without editing a configuration file..?

Any assistance would be greatly appreciated.






reply via email to

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