Subject: Re: bug#37215: [PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings

From: Eli Zaretskii <[email-masked]>
Date: Fri, 21 Feb 2020 11:31:03 +0200

> Cc: [email-masked], [email-masked], [email-masked]
> From: Wolfgang Scherer <[email-masked]>
> Date: Thu, 20 Feb 2020 00:06:11 +0100
> 
> > I'd like to install your patch, and I'd like to do it soon, so it
> > makes it into Emacs 27.  Can you please propose a modified patch which
> > adds some minimal information about what's going on to the doc string
> > and/or the comments around the code?
> 
> Here is the revised patch. I have cleared the FIXME issue mentioned by Lars and added commentary to what is going on.

Thanks, this LGTM.  Just a couple of minor nits, and we can install
this.

> (lisp/vc/pcvs.el) Call ‘vc-cvs-append-to-ignore’ with SORT argument.

Please quote 'like this' in log messages, and try to avoid non-ASCII
characters there (they are generally only necessary in people's
names).

> +Patterns follow glob(7) syntax.  Special characters \"?*[\\\" are
> +escaped with a backslash."

I'd say "should be escaped" here, since this is a requirement for the
argument passed to this function.

Also, I'd mention that FILE can be a pattern, otherwise the reference
to patterns might come as a surprise to the reader.

> +to hear about anymore.  If SORT is non-nil, sort the ines of the
> +ignore file."                                        ^^^^

Typo: should be "lines".

> +    (goto-char (point-min))
> +    (save-match-data
> +      (unless (re-search-forward (concat "^" (regexp-quote str) "$") nil t)
> +        (goto-char (point-max))

You could use non-nil, non-t 3rd argument of re-search-forward, in
which case the following goto-char would be redundant, right?