Subject: bug#76055: 29.4; Doc of string-empty-p

From: Drew Adams <[email-masked]>
Date: Fri, 7 Feb 2025 16:47:37 +0000

> > > However, while extending to strings comparison to symbol names could
> > > make sense, telling whether a string is empty (the subject of this
> > > report) is NOT: what symbol could have an empty name?
> >
> > That's easy.
> >
> > (intern "") gives you such a symbol.
> > It's written ## (dunno why).
> >
> > (symbol-name '##) ; => ""
> 
> And where did you see such symbols used in Emacs?

I didn't say I see uses in Emacs (whatever that
might mean).  I haven't looked for them.

Who introduced the symbol `##' into Elisp?
I have no idea.  But yes, symbols with
empty-string names have long existed in Lisps.
There's no reason they wouldn't or shouldn't.

Do you know of a reason?  If so, do you propose
to change Elisp to remove their possibility?

_I_ didn't design `string=' or `string-empty-p'
to accept symbols.  I'm OK with that, provided
it's documented.

As I said, other reasonable definitions could
do either of the following:

* Return nil for any arg that's not a string.
* Raise an error for any arg that's not a string.

But neither is the choice that Emacs made.

What's not helpful is to name the function as
being about strings, and document it only as
being about strings.  `string=' doc doesn't
have that doc bug, at least.