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: Bob Proulx
Subject: Re: removing white space highlight
Date: Sat, 20 Feb 2016 18:34:17 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

Emanuel Berg wrote:
> 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)

That is one way to do it.  However I don't think it is a good idea to
do this automatically every time.  I would rather see that it needs to
be done and the do it intentionally.  Usually I will do one whitespace
only cleanup with no other changes and do it first.  That way diff -b
or -w or -B or other combination will show as clean with no
non-whitespace changes.  And then I make the change I want to make.
If it is automatic then this mixes those two things both at the same
time.  I would rather see them distict.

Bob



reply via email to

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