summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/rx.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2003-11-01 17:35:23 +0000
committerEli Zaretskii <eliz@gnu.org>2003-11-01 17:35:23 +0000
commit31ce86457aefaffe2c820fb46c17f98c4dea1b9a (patch)
tree84e1dc42844023cb980a3271927c29b65a300b1b /lisp/emacs-lisp/rx.el
parent27036e9bcca9bd2d914fd18b9ccf8bb9592429a9 (diff)
downloademacs-31ce86457aefaffe2c820fb46c17f98c4dea1b9a.tar.gz
(rx-or): Fix the case of "(rx (and ?a (or ?b ?c) ?d))".
Diffstat (limited to 'lisp/emacs-lisp/rx.el')
-rw-r--r--lisp/emacs-lisp/rx.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 8e38aed10d2..bc16a84b156 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -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)