From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Two adjacent spaces and tabify Date: Sun, 09 Nov 2014 18:29:52 +0200 Message-ID: <838ujkpcan.fsf@gnu.org> References: <20141109153307.GA3681@acm.acm> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1415550655 32653 80.91.229.3 (9 Nov 2014 16:30:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Nov 2014 16:30:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 09 17:30:48 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XnVO2-0000TN-Lq for ged-emacs-devel@m.gmane.org; Sun, 09 Nov 2014 17:30:46 +0100 Original-Received: from localhost ([::1]:39213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnVO2-00046l-9E for ged-emacs-devel@m.gmane.org; Sun, 09 Nov 2014 11:30:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnVNX-00045L-So for emacs-devel@gnu.org; Sun, 09 Nov 2014 11:30:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnVNN-0007uz-Su for emacs-devel@gnu.org; Sun, 09 Nov 2014 11:30:15 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:57912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnVNN-0007qt-Kt for emacs-devel@gnu.org; Sun, 09 Nov 2014 11:30:05 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NES00G005F5SY00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sun, 09 Nov 2014 18:30:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NES00G885U4QH60@a-mtaout23.012.net.il>; Sun, 09 Nov 2014 18:30:04 +0200 (IST) In-reply-to: <20141109153307.GA3681@acm.acm> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176627 Archived-At: > Date: Sun, 9 Nov 2014 15:33:07 +0000 > From: Alan Mackenzie > > 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.