From: martin rudalics <rudalics@gmx.at>
To: 1518@emacsbugs.donarmstrong.com
Subject: bug#1518: `rx' making nested `or' forms in a `group' wrong
Date: Tue, 09 Dec 2008 19:19:52 +0100 [thread overview]
Message-ID: <493EB6C8.1000701@gmx.at> (raw)
In-Reply-To: <1228796360.10749.17.camel@eep>
> This one is wrong:
>
> (rx (seq (group "foo" (or (or "asdf" "lkjh") "zab")) "bar"))
> =>
> "\\(foo\\(?:asdf\\|lkjh\\)\\|zab\\)bar"
Just a wild guess - could you try with the following version of
rx-submatch? I don't have the slightest idea how this is supposed to
work :-(
martin
(defun rx-submatch (form)
"Parse and produce code from FORM, which is `(submatch ...)'."
(rx-check form)
(concat "\\("
(if (and (listp (cdr form)) (listp (cadr form)))
(mapconcat #'rx-form (cdr form) nil)
(rx-group-if
(mapconcat (lambda (x) (rx-form x ':)) (cdr form) nil)
(and (memq rx-parent '(* t)) rx-parent)))
"\\)"))
next prev parent reply other threads:[~2008-12-09 18:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <jwvzlj5uk1b.fsf-monnier+emacsbugreports@gnu.org>
2008-12-09 4:19 ` bug#1518: `rx' making nested `or' forms in a `group' wrong Derick Eddington
2008-12-09 17:54 ` Glenn Morris
2008-12-09 18:00 ` Glenn Morris
2008-12-09 18:19 ` martin rudalics [this message]
2008-12-09 21:25 ` bug#1518: marked as done (`rx' making nested `or' forms in a `group' wrong) Emacs bug Tracking System
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=493EB6C8.1000701@gmx.at \
--to=rudalics@gmx.at \
--cc=1518@emacsbugs.donarmstrong.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.