[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two adjacent spaces and tabify
From: |
Eli Zaretskii |
Subject: |
Re: Two adjacent spaces and tabify |
Date: |
Sun, 09 Nov 2014 18:29:52 +0200 |
> Date: Sun, 9 Nov 2014 15:33:07 +0000
> From: Alan Mackenzie <address@hidden>
>
> I have some elisp source on which tabify has been run. This is fine and
> good, but in many places in comments (and even strings), two spaces have
> been replaced by a tab. Even worse, in many other places, two spaces
> have been replaced by tab, space.
>
> With a tab-width of 8, one of these can be expected to occur every
> fourth end of sentence, more or less. This is not good.
>
> It is easy enough to configure tabify such that only spaces at the
> beginning of a line are candidates for tabs, but that might wipe out
> desired tabs (for example, in commented out code).
>
> Does anybody already have a solution for this problem, or any good ideas
> on how to fix the current state (or even how to stop it happening in the
> first place)?
Don't tabify. Instead, set indent-tabs-mode to non-nil, and
_reindent_ everything, e.g. with C-M-\.
Tabify is for text files and ASCII art, not for program sources.