From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Lee Newsgroups: gmane.emacs.help Subject: Re: how do you strip leading white spaces in c-mode or similar? Date: Thu, 05 Jul 2007 12:48:56 -0500 Organization: x Message-ID: References: <1183595671.444536.287460@r34g2000hsd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183660839 11158 80.91.229.12 (5 Jul 2007 18:40:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jul 2007 18:40:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 05 20:40:35 2007 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6WFj-0001kd-Og for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jul 2007 20:40:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6WFj-0002Ht-9T for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jul 2007 14:40:31 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newscon04.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr22.news.prodigy.net.POSTED!404941e6!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (windows-nt) Cancel-Lock: sha1:+ZurT3b0fP6f8fr475/Xtja/4G4= Original-Lines: 14 Original-NNTP-Posting-Host: 66.194.80.196 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssvr22.news.prodigy.net 1183657736 ST000 66.194.80.196 (Thu, 05 Jul 2007 13:48:56 EDT) Original-NNTP-Posting-Date: Thu, 05 Jul 2007 13:48:56 EDT X-UserInfo1: SCSYASFGPBSYRIXXKJJD]_HBWB]^PCPDLXUNNH\KMAVNDQUBLNTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL Original-Xref: shelby.stanford.edu gnu.emacs.help:149902 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:45491 Archived-At: >>>> Johna writes: > Basically I am frustrated with the default indentation in c-mode (or > similar modes) because it inserts unnecessary white space(s) on empty > lines. I want all empty lines to contain nothing but '\n'. Instead they > contain "\n\t" or "\n ". If you are only concerned about the extraneous spaces being persisted you could: insert (add-hook 'before-save-hook 'delete-trailing-whitespace t t) into your mode-hook... which will strip them on each save.