Fix xsdre-range-list-to-char-alternative problem with {P}

* lisp/nxml/xsd-regexp.el (xsdre-range-list-to-char-alternative):
Make (string-match (xsdre-translate "\\p{P}") "a-b") work
(bug#24093) -- the "forbidden" characters don't have to be the
first elements in a range.
This commit is contained in:
Lars Ingebrigtsen 2020-12-02 12:23:13 +01:00
parent bf43bcbed8
commit b31e7c51d6

View file

@ -387,9 +387,15 @@ consisting of a single char alternative delimited with []."
((eq first ?-)
(setq hyphen t)
(setq first (1+ first)))
((eq last ?-)
(setq hyphen t)
(setq last (1- last)))
((eq first ?\])
(setq close-bracket t)
(setq first (1+ first))))
(setq first (1+ first)))
((eq last ?\])
(setq close-bracket t)
(setq last (1- last))))
(<= first last)))
(when (<= first last)
(setq chars