GNU bug report logs -
#25125
25.1; copyright-fix-years pollutes undo history
Previous Next
Reported by: Lluís Vilanova <vilanova <at> ac.upc.edu>
Date: Tue, 6 Dec 2016 19:02:02 UTC
Severity: minor
Tags: moreinfo, unreproducible
Found in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Lluís Vilanova <vilanova <at> ac.upc.edu> 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?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.