[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `st
From: |
Lars Ingebrigtsen |
Subject: |
bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols |
Date: |
Mon, 31 May 2021 10:35:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> "Drew Adams" <drew.adams@oracle.com> 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols,
Lars Ingebrigtsen <=