Subject: Re: bug#72341: VC: CVS template lines not stripped when committing

From: Christoph Badura <[email-masked]>
Date: Mon, 27 Jan 2025 22:58:57 +0100

On Mon, Jan 27, 2025 at 09:49:09PM +0200, Eli Zaretskii wrote:
> > Date: Mon, 27 Jan 2025 20:13:31 +0100
> > From: Christoph Badura <[email-masked]>
> > > > -(defcustom log-edit-done-hook nil
> > > > +(defcustom log-edit-done-hook '(log-edit-done-strip-cvs-lines)
> > > > [...]
> > > > +  :version "30.1"
> > > The :version should change to 31.1.
> > 
> > OK.  But now that the function isn't going to be enabled by default,
> > the :version doesn't need to change (or be added).
> 
> Yes.  But (a) let's hear what others think about making this the
> default, and (b) I think we should add to the doc string of this
> option the reference to this function, whose main purpose is to be
> used in this hook.

Do you mean something like the following?

diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index e5f195c01dd..aff62e8bb3c 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -207,7 +207,8 @@ log-edit-done-hook
 This hook can be used to cleanup the message, enforce various
 conventions, or to allow recording the message in some other database,
 such as a bug-tracking system.  The list of files about to be committed
-can be obtained from `log-edit-files'."
+can be obtained from `log-edit-files'.
+Add `log-edit-done-strip-cvs-lines' to be fully compatible with \"cvs commit\"."
   :group 'log-edit
   :type '(hook :options (log-edit-set-common-indentation
 			 log-edit-add-to-changelog

I'm somewhat surprised.  The other two hook functions aren't mentioned in
the docstring.  And I thought the customize UI would be "obvious" enough.

--chris