From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Solved: Re: tabs with cperl-mode Date: Thu, 09 Jun 2005 10:47:06 -0400 Organization: Bell Sympatico Message-ID: <87aclzd1yt.fsf-monnier+gnu.emacs.help@gnu.org> References: <87br6gfrvi.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118330027 27561 80.91.229.2 (9 Jun 2005 15:13:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2005 15:13:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 09 17:13:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DgOdt-00016p-I9 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2005 17:08:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DgOkp-0007Lo-TU for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2005 11:15:35 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!wn12feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:fmIyXeCbybNktZZvCppWnBMnkw4= Original-Lines: 29 Original-NNTP-Posting-Host: 70.48.82.205 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1118328427 70.48.82.205 (Thu, 09 Jun 2005 10:47:07 EDT) Original-NNTP-Posting-Date: Thu, 09 Jun 2005 10:47:07 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:131908 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:27376 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27376 >> align everything on multiples of 8. I.e. start by setting >> cperl-indent-level to 8. > I changed that. It works :) And i was confused again, because i had > (setq tab-width 4) > in my .emacs . So I googled a bit and I found the solution. > so this works fine for me: > (setq cperl-continued-statement-offset 4) > (setq cperl-indent-level 4) > (setq cperl-tab-always-indent t) > (setq default-tab-width 4) Changing tab-width is asking for trouble. Its normal meaning, agreed upon by all programs is that the width of a TAB is 8, no more no less. If you change it, it'll mess something up at some point. Changing default-tab-width is even worse. At least do (add-hook 'cperl-mode-hook (lambda () (setq tab-width 4))) so it's only fucked up in your cperl mode and not in the rest. Stefan