changeset 52971:d5c1eeaa97e2

(rx-or): Fix the case of "(rx (and ?a (or ?b ?c) ?d))".
author Eli Zaretskii <eliz@gnu.org>
date Sat, 01 Nov 2003 17:35:23 +0000
parents 33edcfca670d
children 373fa562b36f
files lisp/emacs-lisp/rx.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/rx.el	Sat Nov 01 17:12:02 2003 +0000
+++ b/lisp/emacs-lisp/rx.el	Sat Nov 01 17:35:23 2003 +0000
@@ -286,9 +286,11 @@
     (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)