Subject: bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 31 May 2021 10:35:01 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> "Drew Adams" <[email-masked]> writes:
>
>> Not important, but why not let `compare-strings', like `string-lessp',
>> accept a symbol for either of its string parameters?
>
> I think that makes sense.  There's no ambiguity here, and I like being
> able to use symbols more without converting.

Thinking about this for five more years, I don't think extending this
function to take symbols would help that much.  The signature is:

(compare-strings STR1 START1 END1 STR2 START2 END2 &optional
IGNORE-CASE)

So the function isn't really for comparing strings, but comparing string
prefixes.  Looking at the Emacs tree, comparing symbol name prefixes
doesn't seem to happen a lot, so I think complicating the signature this
way wouldn't yield much extra convenience.  Closing.

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