From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Preserving trailing spaces Date: Thu, 19 Apr 2007 18:37:58 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <874pncnzmx.fsf@kobe.laptop> References: <10028734.post@talk.nabble.com> <87tzvds1eb.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1177000538 14199 80.91.229.12 (19 Apr 2007 16:35:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2007 16:35:38 +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 Apr 19 18:35:32 2007 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 1HeZbR-0006Oo-5V for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Apr 2007 18:35:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeZgO-0004Ab-Ah for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Apr 2007 12:40:32 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.albasani.net!nuzba.szn.dk!news.szn.dk!pnx.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (berkeley-unix) Cancel-Lock: sha1:mAFxwBczD7LIgxzPt38YIJn3mqY= Original-Lines: 25 Original-NNTP-Posting-Host: 62.103.39.229 Original-X-Trace: news.sunsite.dk DXC=V4oM9OT5m6G1F[; SJ[; K0EYSB=nbEKnkKV`^KZl[Dm9LL^MjG2:ak; I7eU]GGb30c[>DY7KKm\0fk\6YDD Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:147220 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:42825 Archived-At: jgombos writes: > Giorgos Keramidas wrote: >> It looks like your `write-file-hooks' deletes whitespace. >> >> Can you check the value of this variable when you have opened >> a buffer with your source code? I don't have any local >> write-file-hooks loaded right now, so when I type `M-: (list >> write-file-hooks)' my message buffer shows: >> >> (nil) >> >> If yours shows a non-nil list of hooks, you should examine the >> hooks to see if one (or more) of them calls >> `delete-trailing-whitespace' or some other custom function >> with a similar effect. > > Thanks for the tip. That's useful to know. I listed the > write-file-hooks, and the result was (nil). Dieter Wilhelm's > solution worked > [which was to add (setq ada-clean-buffer-before-saving nil) to > .emacs], so it must have been a major mode hook that removed > the trailing whitespace. Nice. I didn't know about `ada-clean-buffer-before-saving' :)