diff options
author | Eli Zaretskii <eliz@gnu.org> | 2003-11-01 17:35:49 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2003-11-01 17:35:49 +0000 |
commit | cdddbfd273edd13323019898a74ba36f9cfe5e89 (patch) | |
tree | f96f2f918f7e20c1004c6aca0ff0243899f9d33f /lisp/emacs-lisp | |
parent | 01cf96d518026af58c101aead1f671d90a5e9edb (diff) | |
download | emacs-cdddbfd273edd13323019898a74ba36f9cfe5e89.tar.gz |
(rx-or): Fix the case of "(rx (and ?a (or ?b ?c) ?d))".
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/rx.el | 8 |
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) |