From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: RE: how do you strip leading white spaces in c-mode or similar? Date: Thu, 5 Jul 2007 16:49:04 +0800 Message-ID: <63F95800EDD046419F17688AAFD41CCF01A918AC@rnd-ex01.rnd.gdnt.local> References: <1183595671.444536.287460@r34g2000hsd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1183625486 10921 80.91.229.12 (5 Jul 2007 08:51:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jul 2007 08:51:26 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 05 10:51:23 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 1I6N3Y-000546-4A for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jul 2007 10:51:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6N3X-0002uN-6B for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jul 2007 04:51:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6N3B-0002re-S0 for help-gnu-emacs@gnu.org; Thu, 05 Jul 2007 04:50:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6N3B-0002qe-15 for help-gnu-emacs@gnu.org; Thu, 05 Jul 2007 04:50:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6N3A-0002qR-S7 for help-gnu-emacs@gnu.org; Thu, 05 Jul 2007 04:50:56 -0400 Original-Received: from email.gdnt.com.cn ([202.104.30.38]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I6N35-0006xG-R2 for help-gnu-emacs@gnu.org; Thu, 05 Jul 2007 04:50:56 -0400 Original-Received: from sd-ef-01.cnshn.gdnt.local ([202.38.41.132]) by email.gdnt.com.cn with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Jul 2007 16:53:16 +0800 Original-Received: from sd-ex-02.cnshn.gdnt.local ([202.38.38.7]) by sd-ef-01.cnshn.gdnt.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Jul 2007 03:52:42 -0500 Original-Received: from rnd-ex01.rnd.gdnt.local ([202.38.32.250]) by sd-ex-02.cnshn.gdnt.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Jul 2007 16:52:41 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: <1183595671.444536.287460@r34g2000hsd.googlegroups.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: how do you strip leading white spaces in c-mode or similar? Thread-Index: Ace+4AkQgB475rCzS5Wl5hYNtlm5zAAAPHmA X-OriginalArrivalTime: 05 Jul 2007 08:52:41.0517 (UTC) FILETIME=[D8A835D0:01C7BEE1] X-TM-AS-Product-Ver: SMEX-7.0.0.1345-3.6.1039-15232.002 X-TM-AS-Result: No--0.719300-8.000000-31 X-detected-kernel: Windows 2000 SP4, XP SP1+ 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:45481 Archived-At: =20 Try this: delete-trailing-whitespace -----Original Message----- From: help-gnu-emacs-bounces+brianjiang=3Dgdnt.com.cn@gnu.org = [mailto:help-gnu-emacs-bounces+brianjiang=3Dgdnt.com.cn@gnu.org] On = Behalf Of Johna Sent: 2007=C4=EA7=D4=C25=C8=D5 8:35 To: help-gnu-emacs@gnu.org Subject: how do you strip leading white spaces in c-mode or similar? Hi, I googled around to no avail. 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 ". The preferred solution that I am looking for is a way to inhibit white = space insertion on empty lines across all modes that have anything to do = with programming languages. Example: ------------------------------------ int foo(int x) { int y =3D x/2; // the preceding empty line contains superfluous and annoying white = space! return y; } ------------------------------------- _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs