From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Johnny L. Wales" Newsgroups: gmane.emacs.help Subject: Tab stops in perl mode broken? Date: Tue, 20 May 2003 15:12:05 -0500 (CDT) Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1053462384 24629 80.91.224.249 (20 May 2003 20:26:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 20 May 2003 20:26:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue May 20 22:26:15 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19IDY2-0005Yj-00 for ; Tue, 20 May 2003 22:17:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19IDYn-0002Kq-08 for gnu-help-gnu-emacs@m.gmane.org; Tue, 20 May 2003 16:18:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19IDTr-00013M-30 for help-gnu-emacs@gnu.org; Tue, 20 May 2003 16:13:03 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19IDTJ-0000FP-JV for help-gnu-emacs@gnu.org; Tue, 20 May 2003 16:12:30 -0400 Original-Received: from [216.180.36.2] (helo=mail.booksys.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19IDSw-0008Oq-N0 for help-gnu-emacs@gnu.org; Tue, 20 May 2003 16:12:06 -0400 Original-Received: from mail.booksys.com (localhost.localdomain [127.0.0.1]) by mail.booksys.com (8.11.6/8.11.6) with ESMTP id h4KKC6j07670 for ; Tue, 20 May 2003 15:12:06 -0500 Original-Received: from localhost (johnny@localhost) by mail.booksys.com (8.11.6/8.11.6) with ESMTP id h4KKC5J07663 for ; Tue, 20 May 2003 15:12:05 -0500 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9942 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9942 [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 ""; print "Canvassing report: $rqpairs{'area'}\n"; print ""; print "Canvassing report for $rqpairs{'area'}
"; $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.