(rx-or): Fix the case of "(rx (and ?a (or ?b ?c) ?d))".

This commit is contained in:
Eli Zaretskii 2003-11-01 17:35:49 +00:00
parent 01cf96d518
commit cdddbfd273
2 changed files with 10 additions and 3 deletions

View file

@ -286,9 +286,11 @@ FORM is of the form `(and FORM1 ...)'."
(dolist (arg (cdr form))
(unless (stringp arg)
(setq all-args-strings nil)))
(if all-args-strings
(regexp-opt (cdr form))
(mapconcat #'rx-to-string (cdr form) "\\|"))))
(concat "\\(?:"
(if all-args-strings
(regexp-opt (cdr form))
(mapconcat #'rx-to-string (cdr form) "\\|"))
"\\)")))
(defun rx-quote-for-set (string)