GNU bug report logs - #76242
[PATCH] Clarify that mapconcat's FUNCTION can return nil

Previous Next

Package: emacs;

Reported by: Hong Xu <hong <at> topbug.net>

Date: Wed, 12 Feb 2025 22:29:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 76242 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 76242 <at> debbugs.gnu.org, hong <at> topbug.net
Subject: Re: bug#76242: [PATCH] Clarify that mapconcat's FUNCTION can return
 nil
Date: Thu, 13 Feb 2025 09:57:05 +0200
> Cc: hong <at> topbug.net
> 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" <bug-gnu-emacs <at> gnu.org>
> 
> Hong Xu via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <bug-gnu-emacs <at> gnu.org> 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.




This bug report was last modified 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.