Subject: Re: bug#18039: 24.3; Broken docstring in cl-style functions

From: Stefan Monnier <[email-masked]>
Date: Sat, 19 Jul 2014 12:50:23 -0400

> The newline character in the (printed) argument list makes a
> difference in this expression in help-add-fundoc-usage:

>     (if (and (stringp arglist)
> 	     (string-match "\\`([^ ]+\\(.*\\))\\'" arglist))
> 	(concat "(fn" (match-string 1 arglist) ")")
>       (format "%S" (help-make-usage 'fn arglist)))

> (help-make-usage doesn't seem to expect a stringp arglist).  Should the
> regexp given to string-match be changed?

Indeed, we have a bug there.  We should/could probably arrange for
arglist to be on a single line (quote newlines as \n), but we should
also make the code more robust such that when the regexp fails to match
we signal an error rather than fallback to the non-string case which
then burps.

        Stefan