all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6985: rx patterns don't compose
@ 2010-09-04 23:37 Daniel Colascione
  2010-09-05  7:22 ` Stefan Monnier
  2010-09-05  7:39 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Colascione @ 2010-09-04 23:37 UTC (permalink / raw)
  To: 6985

It's not possible to do this currently:

(defconst foo-re (rx "abc"))
(defconst bar-re (rx (* (what-goes-here? foo-re)))

in any sensible way. This won't work

  (defconst bar-re (rx (* (regexp foo-re))))

because regexp always expects a string.

This won't work, because eval always quotes its argument:

  (defconst bar-re (rx (* (eval foo-re))))

I propose allowing regexp to accept a symbol as well as a string, and
using that symbol's value literally. Alternatively, rx could provide an
eval-unquoted facility. Or both.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-05 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-04 23:37 bug#6985: rx patterns don't compose Daniel Colascione
2010-09-05  7:22 ` Stefan Monnier
2010-09-05  7:39 ` Andreas Schwab
2010-09-05  7:42   ` Daniel Colascione
2010-09-05 10:45     ` Andreas Schwab

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.