VC: New hook to strip CVS template lines when committing
Add a hook function to strip all lines beginning with "CVS:" from the
commit message as CVS does. Do this only if 'log-edit-vc-backend' is
'CVS'. (Bug#72341)
* lisp/vc/log-edit.el
(log-edit-done-strip-cvs-lines): New command.
(log-edit-done-hook): Add it as an option.
* test/lisp/vc/log-edit-tests.el
(log-edit-done-strip-cvs-lines-helper): New function.
(log-edit-done-strip-cvs-lines-cvs)
(log-edit-done-strip-cvs-lines-non-cvs)
(log-edit-done-strip-cvs-lines-only-cvs-colon-blank)
(log-edit-done-strip-cvs-lines-only-cvs-colon): New test cases.
* etc/NEWS: Mention log-edit-done-strip-cvs-lines.
(cherry picked from commit
00e284fc52b44fc3cb435a5d17ce58af1b753a34)