From: seberino@spawar.navy.mil (Christian Seberino)
Subject: Re: How delete whitespace at END of file automatically when save and exit file?
Date: 25 Aug 2003 16:55:30 -0700 [thread overview]
Message-ID: <bf23f78f.0308251555.1dd14278@posting.google.com> (raw)
In-Reply-To: 8765kr995j.fsf@member.fsf.org
I tried your function and it worked!! Thanks! Very useful.
Chris
Jose A. Ortega Ruiz <jao@member.fsf.org> wrote in message news:<8765kr995j.fsf@member.fsf.org>...
> hi,
>
> (defun my-delete-trailing-lines ()
> (goto-char (point-max))
> (delete-blank-lines))
>
> (add-hook 'write-file-hooks 'my-delete-trailing-lines)
>
> warning: untested :)
>
> hth,
> jao
>
> seberino@spawar.navy.mil (Christian Seberino) writes:
>
> > delete-trailing-whitespace deletes whitespace at LEFT but not at
> > BOTTOM!? How do BOTTOM too?
> >
> >
> > In other words... if I have a bunch of newlines at the end, e.g.
> > \n\n\n\n\n
> >
> > ...How replace them with just one \n?
> >
> > chris
next prev parent reply other threads:[~2003-08-25 23:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-20 22:52 How delete whitespace at END of file automatically when save and exit file? Christian Seberino
2003-08-20 23:55 ` Jose A. Ortega Ruiz
2003-08-21 6:39 ` Lute Kamstra
2003-08-25 23:55 ` Christian Seberino [this message]
2003-08-28 19:11 ` Christian Seberino
2003-08-29 14:51 ` Thien-Thi Nguyen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf23f78f.0308251555.1dd14278@posting.google.com \
--to=seberino@spawar.navy.mil \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).