From: Jose A. Ortega Ruiz <jao@member.fsf.org>
Subject: Re: How delete whitespace at END of file automatically when save and exit file?
Date: Thu, 21 Aug 2003 01:55:20 +0200 [thread overview]
Message-ID: <8765kr995j.fsf@member.fsf.org> (raw)
In-Reply-To: bf23f78f.0308201452.352911a6@posting.google.com
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
--
An eye for an eye leaves everyone blind. -Mohandas Karamchand Gandhi
(1869-1948)
next prev parent reply other threads:[~2003-08-20 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 [this message]
2003-08-21 6:39 ` Lute Kamstra
2003-08-25 23:55 ` Christian Seberino
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=8765kr995j.fsf@member.fsf.org \
--to=jao@member.fsf.org \
/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).