Subject: bug#76242: [PATCH] Clarify that mapconcat's FUNCTION can return nil

From: Eli Zaretskii <[email-masked]>
Date: Thu, 13 Feb 2025 09:57:05 +0200

> Cc: [email-masked]
> Date: Thu, 13 Feb 2025 02:27:52 +0100
> From:  Michael Heerdegen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Hong Xu via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <[email-masked]> writes:
> 
> > -FUNCTION must be a function of one argument, and must return a value
> > -  that is a sequence of characters: either a string, or a vector or
> > -  list of numbers that are valid character codepoints.  */)
> > + FUNCTION must be a function of one argument, and must return either:
> > +
> > +   nil, which is treated as an empty string, or
> > +   a value that is a sequence of characters, which is either a string,
> > +   or a vector or list of numbers that are valid character codepoints. */)
> 
> I don't understand the rationale.  Isn't nil just one case of an empty
> sequence of characters?  Why describe it specially?

How about the below instead:

  FUNCTION must be a function of one argument, and must return a value
    that is a sequence of characters: either a string, or a vector or
    list of numbers that are valid character codepoints; nil is treated
    as an empty string.