diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el index 622ba911995..3ce59b75560 100644 --- a/lisp/nxml/xsd-regexp.el +++ b/lisp/nxml/xsd-regexp.el @@ -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