* bug#52954: Rename split-string to string-split
@ 2022-01-02 16:46 Stefan Kangas
2022-01-14 9:09 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2022-01-02 16:46 UTC (permalink / raw)
To: 52954
Severity: wishlist
The function `split-string' does not follow use the `string-' prefix
that we use for many other string functions. How about renaming it and
introducing an alias for the old name?
IOW, basically the below and the necessary documentation fixes and so
on:
diff --git a/lisp/subr.el b/lisp/subr.el
index 11105c4aa6..a9bd406b63 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4890,7 +4890,7 @@ split-string-default-separators
;; defaulted, OMIT-NULLS should be treated as t. Simplifying the logical
;; expression leads to the equivalent implementation that if SEPARATORS
;; is defaulted, OMIT-NULLS is treated as t.
-(defun split-string (string &optional separators omit-nulls trim)
+(defun string-split (string &optional separators omit-nulls trim)
"Split STRING into substrings bounded by matches for SEPARATORS.
The beginning and end of STRING, and each match for SEPARATORS, are
@@ -4969,6 +4969,7 @@ split-string
(funcall push-one)
(nreverse list)))
+(defalias 'split-string #'string-split) ; renamed in 29.1
(defun combine-and-quote-strings (strings &optional separator)
"Concatenate the STRINGS, adding the SEPARATOR (default \" \").
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#52954: Rename split-string to string-split
2022-01-02 16:46 bug#52954: Rename split-string to string-split Stefan Kangas
@ 2022-01-14 9:09 ` Lars Ingebrigtsen
2022-01-14 9:43 ` Stefan Kangas
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-14 9:09 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 52954
Stefan Kangas <stefan@marxist.se> writes:
> The function `split-string' does not follow use the `string-' prefix
> that we use for many other string functions. How about renaming it and
> introducing an alias for the old name?
We've got a whole bunch of functions that are
`something-something-string', and I'd rather not rename them all. So
I'm leaning towards "no" (because having several names for functions
that are commonly used makes reading code more of a chore), and I'm
therefore closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#52954: Rename split-string to string-split
2022-01-14 9:09 ` Lars Ingebrigtsen
@ 2022-01-14 9:43 ` Stefan Kangas
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2022-01-14 9:43 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 52954
Lars Ingebrigtsen <larsi@gnus.org> writes:
> We've got a whole bunch of functions that are
> `something-something-string', and I'd rather not rename them all. So
> I'm leaning towards "no" (because having several names for functions
> that are commonly used makes reading code more of a chore), and I'm
> therefore closing this bug report.
Fair enough.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-14 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-02 16:46 bug#52954: Rename split-string to string-split Stefan Kangas
2022-01-14 9:09 ` Lars Ingebrigtsen
2022-01-14 9:43 ` Stefan Kangas
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).