unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: 52954@debbugs.gnu.org
Subject: bug#52954: Rename split-string to string-split
Date: Sun, 2 Jan 2022 11:46:37 -0500	[thread overview]
Message-ID: <CADwFkmnNGHs9ws-PFSPSJtXYpj05NXhvsFxa6ftJZDOUnORLAw@mail.gmail.com> (raw)

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 \" \").





             reply	other threads:[~2022-01-02 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-02 16:46 Stefan Kangas [this message]
2022-01-14  9:09 ` bug#52954: Rename split-string to string-split Lars Ingebrigtsen
2022-01-14  9:43   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmnNGHs9ws-PFSPSJtXYpj05NXhvsFxa6ftJZDOUnORLAw@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=52954@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).