all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Two adjacent spaces and tabify
Date: Sun, 09 Nov 2014 18:29:52 +0200	[thread overview]
Message-ID: <838ujkpcan.fsf@gnu.org> (raw)
In-Reply-To: <20141109153307.GA3681@acm.acm>

> Date: Sun, 9 Nov 2014 15:33:07 +0000
> From: Alan Mackenzie <acm@muc.de>
> 
> 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.



  reply	other threads:[~2014-11-09 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 15:33 Two adjacent spaces and tabify Alan Mackenzie
2014-11-09 16:29 ` Eli Zaretskii [this message]
2014-11-10  9:50   ` Sebastien Vauban
2014-11-10 10:53     ` Eli Zaretskii
2014-11-10 11:22       ` Sebastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838ujkpcan.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.