GNU bug report logs - #6985
rx patterns don't compose

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dan.colascione <at> gmail.com>

Date: Sat, 4 Sep 2010 23:37:02 UTC

Severity: wishlist

Tags: fixed, patch

Merged with 36237

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Colascione <dan.colascione <at> gmail.com>
To: 6985 <at> debbugs.gnu.org
Subject: bug#6985: rx patterns don't compose
Date: Sat, 04 Sep 2010 16:37:49 -0700
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.




This bug report was last modified 5 years and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.