On Sat, Jul 27, 2019, 13:41 Lars Ingebrigtsen wrote: > Lluís Vilanova writes: > > > I have setup `copyright-update' to run every time I save a file in > prog-mode: > > > > (add-hook 'prog-mode-hook > > (lambda () > > (add-hook 'before-save-hook > > (lambda () > > (save-excursion (copyright-fix-years)))))) > > > > Every time it runs in a file that has a copyright, a change is recorded > into the > > undo history, even if the function performed no changes at all (i.e., the > > copyright years were already correct). > > > > This makes it quite annoying to go back my modifications history, > > since it keeps jumping up and down between the header and the actual > > code. > > (I'm going through older Emacs bug reports that have received no > response.) > > I tried testing this by just saying `M-x copyright-fix-years' in a file > where it doesn't do any changes (like lisp/emacs-lisp/edebug.el). It > didn't record anything in the undo history, so I'm unable to reproduce > this bug in Emacs 27. Are you still seeing this? > I do not use this anymore, so I do not know. I think it's safe to close it. Thanks, Lluís