Subject: Re: bug#44858: [PATCH] Make byte-compiler warn about wide docstrings

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 26 Nov 2020 11:49:55 +0100

Stefan Kangas <[email-masked]> writes:

> ** Make byte-compiler warn when a doc string is too wide
>
> Please find attached a patch that implements this.

I like it.

> Notably, it omits defuns, and ignores any lines containing
> `substitute-command-keys' style substitutions.
>
> I've been messing around with getting defuns to work, but I can't find a
> way for it to work reliably.  The problem is that they are already macro
> expanded when we start issuing warnings, so it's not trivial to reliably
> separate defuns from other cases where lambda is used.

I'm probably misunderstanding you completely, but do we have to separate
between lambda and defuns?  lambdas can also have doc strings...

> (If you were to add defuns into the mix, we would get around 700
> warnings for wide docstrings, several of which would be autogenerated.
> We should probably look into that at some point...)

Yes, the autogenerated docstrings should be fixed, too -- mostly by
running them through `fill-paragraph'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no