From: Eli Zaretskii Date: Sat, 1 Nov 2003 17:35:49 +0000 (+0000) Subject: (rx-or): Fix the case of "(rx (and ?a (or ?b ?c) ?d))". X-Git-Tag: ttn-vms-21-2-B4~8439 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cdddbfd273edd13323019898a74ba36f9cfe5e89;p=emacs.git (rx-or): Fix the case of "(rx (and ?a (or ?b ?c) ?d))". --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9094e15a8b6..11fad844e80 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-11-01 Oliver Scholz + + * emacs-lisp/rx.el (rx-or): Fix the case of + "(rx (and ?a (or ?b ?c) ?d))". + 2003-11-01 Christoph Wedler (tiny change) * textmodes/texinfmt.el (texinfo-pre-format-hook): New variable. 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)