unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols
@ 2012-12-04 18:46 Drew Adams
  2016-04-28 17:35 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2012-12-04 18:46 UTC (permalink / raw)
  To: 13082

Not important, but why not let `compare-strings', like `string-lessp',
accept a symbol for either of its string parameters?
 

In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2012-12-03 on MS-W7-DANI
Bzr revision: 111077
agustin.martin@hispalinux.es-20121203172342-ifsebjmhksk28qa9
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -Ic:/emacs/libs/libXpm-3.5.10/include -Ic:/emacs/libs/libXpm-3.5.10/src
 -Ic:/emacs/libs/libpng-1.2.37-lib/include -Ic:/emacs/libs/zlib-1.2.5
 -Ic:/emacs/libs/giflib-4.1.4-1-lib/include
 -Ic:/emacs/libs/jpeg-6b-4-lib/include
 -Ic:/emacs/libs/tiff-3.8.2-1-lib/include
 -Ic:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
 -Ic:/emacs/libs/gnutls-3.0.9-w32-bin/include
 -Ic:/emacs/libs/libiconv-1.9.2-1-lib/include'
 






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols
  2012-12-04 18:46 bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols Drew Adams
@ 2016-04-28 17:35 ` Lars Ingebrigtsen
  2021-05-31  8:35   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-28 17:35 UTC (permalink / raw)
  To: Drew Adams; +Cc: 13082

"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.  (Kinda Common Lisp-ish,
but don't tell anyone!  Shh!)

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols
  2016-04-28 17:35 ` Lars Ingebrigtsen
@ 2021-05-31  8:35   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-31  8:35 UTC (permalink / raw)
  To: Drew Adams; +Cc: 13082

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-31  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04 18:46 bug#13082: 24.3.50; Enhancement request: let `compare-strings', like `string-lessp', accept symbols Drew Adams
2016-04-28 17:35 ` Lars Ingebrigtsen
2021-05-31  8:35   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).