[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clear trailing whitespace on save, but not at the cursor
From: |
Juanma Barranquero |
Subject: |
Re: Clear trailing whitespace on save, but not at the cursor |
Date: |
Mon, 5 Mar 2012 16:07:51 +0100 |
On Mon, Mar 5, 2012 at 12:02, Thien-Thi Nguyen <ttn@gnuvola.org> wrote:
> (defadvice delete-trailing-whitespace
> (around except-for-current-line activate)
> "However, leave trailing whitespace before point alone."
> (let ((save (when (looking-back "\\s-+" (line-beginning-position) t)
> (match-string 0))))
> ad-do-it
> (when save (insert save))))
That does not answer to this part of the request:
> I'm wondering if it's possible to do it in
> such a way that if I save and then quit, it doesn't bug me about
> saving because it modified the file again with the new whitespace.
Juanma
- Clear trailing whitespace on save, but not at the cursor, Aaron Meurer, 2012/03/04
- Re: Clear trailing whitespace on save, but not at the cursor, Thien-Thi Nguyen, 2012/03/05
- Re: Clear trailing whitespace on save, but not at the cursor,
Juanma Barranquero <=
- Re: Clear trailing whitespace on save, but not at the cursor, Thien-Thi Nguyen, 2012/03/06
- Re: Clear trailing whitespace on save, but not at the cursor, Aaron Meurer, 2012/03/21
- Re: Clear trailing whitespace on save, but not at the cursor, Le Wang, 2012/03/22
- Re: Clear trailing whitespace on save, but not at the cursor, Aaron Meurer, 2012/03/22
Re: Clear trailing whitespace on save, but not at the cursor, Deniz Dogan, 2012/03/05