[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new behaviour of `split-string'

From: Simon Josefsson
Subject: new behaviour of `split-string'
Date: Fri, 14 Nov 2003 23:20:47 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

A Gnus bug was caused by a problem with `split-string'.

Emacs 21.2:

(split-string ":foo:bar" ":")
=> ("foo" "bar")

Emacs CVS:

(split-string ":foo:bar" ":")
=> ("" "foo" "bar")

There is no NEWS entry for this change, although it seems important
enough to warrant one.

Is this a bug in Emacs CVS or a feature that lack a NEWS entry?

The docstring for the function has been changed.

Emacs 21.2:

If there is match for SEPARATORS at the beginning of STRING, we do not
include a null substring for that.  Likewise, if there is a match
at the end of STRING, we don't include a null substring for that.

Emacs CVS:

The beginning and end of STRING, and each match for SEPARATORS, are
splitting points.  The substrings matching SEPARATORS are removed, and
the substrings between the splitting points are collected as a list,
which is returned.

I suggest adding the following to NEWS:

*** The function `split-string' now include a null substring when
there is a SEPARATOR at the beginning or end of STRING.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]