Eli Zaretskii <eliz@gnu.org> schrieb am Fr., 6. Jan. 2017 um 16:11 Uhr:> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Fri, 06 Jan 2017 15:00:22 +0000
> Cc: 25366@debbugs.gnu.org
>
> http://www.unicode.org/reports/tr18/tr18-19.html#Compatibility_Properties
>
> Patches to that effect are welcome.
>
> Here's a patch.
Thanks. A few minor comments below.
> +/* Return true if C is a horizontal whitespace character, as defined
> + by http://www.unicode.org/reports/tr18/tr18-19.html#blank. */
> +bool
> +blankp (int c)
> +{
> + if (c == '\t')
> + return true;
Why does this test explicitly only for a TAB? What about SPC, for
example?Because TAB is the only character that is blank, but doesn't have the general category Zs.I've now also included space and added a comment. The risk that the general category of space will ever be changed seems very small.
> --- a/doc/lispref/searching.texi
> +++ b/doc/lispref/searching.texi
> @@ -553,7 +553,10 @@ Char Classes
> (@pxref{Character Properties}) indicates they are alphabetic
> characters.
> @item [:blank:]
> -This matches space and tab only.
> +This matches horizontal whitespace, as defined by Unicode Technical
> +Standard #18. In particular, it matches tabs and characters whose
> +Unicode @samp{general-category} property (@pxref{Character
> +Properties}) indicates they are spacing separators.
Similarly here: I find the lack of reference to a space potentially
confusing.Added.
> +** The regular expression character class [:blank:] now matches
> +Unicode horizontal whitespace as defined in
> +http://www.unicode.org/reports/tr18/tr18-19.html#blank.
The reference to a particular version of UTS#18 might become obsolete
when a new version is released. So I suggest to provide a general
reference to the report and its section, not an exact URL.Done.