Subject: Re: bug#60066: 30.0.50; whitespace-mode modifies buffer

From: Eli Zaretskii <[email-masked]>
Date: Wed, 14 Dec 2022 18:14:56 +0200

> From: Bastian Beranek <[email-masked]>
> Date: Wed, 14 Dec 2022 15:26:03 +0100
> 
> 
> I have
> 
> (add-hook 'c-mode-common-hook 'whitespace-mode)
> 
> in my .emacs and I am using emacs master (which includes
> whitespace.el). When opening a source file in my project the buffer
> immediately is marked as modified and emacs will ask to save the buffer
> when trying to kill it.
> 
> I was able to trace this back to the above line in my .emacs. If I don't
> enable whitespace-mode in the hook the buffer is not marked as modified
> when opening the .C file.
> 
> With my configuration I would not expect whitespace-mode to make any
> changes to the buffer.
> 
> I went back to whitespace.el from commit
> 
> 29eb4596956a74a83ceb4c17835886a23ea0dd20
> 
> and the problem is fixed. So I assume it is a recent regression in
> whitespace.el.

Richard, could you please look into this?  It sounds like your recent
changes to whitespace.el could be the culprit for this regression.  I
guess something like with-silent-modifications is missing somewhere?