help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing white space highlight


From: Emanuel Berg
Subject: Re: removing white space highlight
Date: Sun, 21 Feb 2016 01:32:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Bob Proulx <bob@proulx.com> writes:

> now that version control is everywhere (among other
> things) I am now sensitive to whitespace causing
> useless diffs in files. Whitespace that I never
> cared about before is now cruft that I always clean
> in order to avoid noisy diffs.

Of course, there shouldn't be any superfluous
whitespace trailing individual text lines *or* the
file contents itself.

Here one way to do it:

    ;; (setq before-save-hook nil)
    (defun before-save-hook-f ()
      (delete-trailing-whitespace) )
    (setq before-save-hook #'before-save-hook-f)

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]