--- Begin Message ---
Subject: |
26.1; unibyte/multibyte missing in rx.el |
Date: |
Tue, 30 Oct 2018 16:03:28 +0100 |
rx.el has constructs corresponding to all named regexp character
classes ([[:alnum:]], [[:digit:]], etc) except unibyte and multibyte.
This looks like a simple omission.
Or is it on purpose? The ascii and nonascii classes appear very
similar; I haven't been able to see any operational difference from
unibyte and multibyte, respectively. In fact, neither seem to work as
expected on unibyte strings or buffers:
(setq s "A\310")
"A\310"
(multibyte-string-p s)
nil
(string-match-p "A[[:nonascii:]]" s)
nil
(string-match-p "A[[:ascii:]]" s)
nil
(string-match-p "A[[:unibyte:]]" s)
nil
(string-match-p "A[[:multibyte:]]" s)
nil
(string-match-p "A." s)
0
What is going on here? ascii/nonascii and unibyte/multibyte are
supposed to be complementary; if both fail, it's because there is
nothing to match. Yet . matches.
(By the way, you may want to fix a trivial typo in a doc string in
rx.el while you are at it: `indian-tow-byte')
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#33205: 26.1; unibyte/multibyte missing in rx.el |
Date: |
Sat, 29 Dec 2018 16:55:25 +0200 |
> From: Mattias EngdegÄrd <address@hidden>
> Date: Sat, 29 Dec 2018 11:43:56 +0100
> Cc: address@hidden
>
> Thank you; new patch attached.
Thanks, pushed to the master branch.
--- End Message ---