unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
[parent not found: <mailman.6530.1053528247.21513.help-gnu-emacs@gnu.org>]
* Tab stops in perl mode broken?
@ 2003-05-20 20:12 Johnny L. Wales
  0 siblings, 0 replies; 8+ messages in thread
From: Johnny L. Wales @ 2003-05-20 20:12 UTC (permalink / raw)


[root@bugzilla 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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-05-22 11:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6487.1053461876.21513.help-gnu-emacs@gnu.org>
2003-05-20 22:38 ` Tab stops in perl mode broken? lawrence mitchell
2003-05-21 14:37   ` Johnny L. Wales
2003-05-21 16:22 ` Stefan Monnier
2003-05-22 11:03 ` Kai Großjohann
2003-05-22 11:36 ` Oliver Scholz
     [not found] <mailman.6530.1053528247.21513.help-gnu-emacs@gnu.org>
2003-05-21 15:33 ` lawrence mitchell
2003-05-21 19:37 ` Edward O'Connor
2003-05-20 20:12 Johnny L. Wales

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).