[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Solved: Re: tabs with cperl-mode
From: |
Stefan Monnier |
Subject: |
Re: Solved: Re: tabs with cperl-mode |
Date: |
Thu, 09 Jun 2005 10:47:06 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> 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