Subject: bug#50839: 28.0.50; Odd things in comp-ctxt doc string

From: Stefan Kangas <[email-masked]>
Date: Mon, 27 Sep 2021 02:51:09 -0700

tags 50839 fixed
close 50839 28.1
thanks

Lars Ingebrigtsen <[email-masked]> writes:

> Lars Ingebrigtsen <[email-masked]> writes:
>
>> But looking at the actual help buffer, I get the stuff below.
>>
>> It looks like bits of the doc strings have been replaced with...  odd
>> things?  "lambdas" is now "lamcomp-func.dbdas".  And also the
>> "byte-funCL-X.ction" thing.  I haven't debugged any further; perhaps
>> it's obvious to someone what's going on.  (I've added Andrea to the CCs.)
>
> Oh, and this started happening after Stefan K's long-doc-string warning
> enablement in lambda, so perhaps it's related to that (or perhaps that
> just makes the problem more obvious).  (So I've added him to the CCs, too.)

Thanks, this is now fixed on master in commit 3d2d7e8ea2.

This was caused by trying to fill an entire paragraph as if it were a
single line.  Here, I really wish we could use `cl-assert' in subr.el,
to do something like this in `internal--format-docstring-line':

    (cl-assert (not (string-match "\n" string)))

Do we have anything like that, or do we just do something like this
instead?

    (and (string-match "\n" string)
         (error "Contains newline: %s" string))

Maybe this is okay as this should pretty much only be called from
macros?