--- Begin Message ---
Subject: |
[PATCH] sregex.el: Ease limitation on literal sregexes. |
Date: |
Fri, 10 Sep 2010 16:45:01 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
Currently, the `sregexq' macro accepts only literal sregexes as args.
The patch permits it to accept all kinds of macro-generated goodness.
A simple example:
(let ((forms '("abc" "def")))
(sregexq `(or ,@forms)))
---
=== modified file 'lisp/emacs-lisp/sregex.el'
--- old/lisp/emacs-lisp/sregex.el 2010-01-13 08:35:10 +0000
+++ new/lisp/emacs-lisp/sregex.el 2010-09-10 14:29:30 +0000
@@ -476,7 +476,7 @@
- A pair (MIN . MAX)
Where MIN and MAX are characters, adds the range of characters
from MIN through MAX to the set."
- `(apply 'sregex ',exps))
+ `(sregex ,@exps))
(defun sregex--engine (exp combine)
(cond
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#7010: [PATCH] sregex.el: Ease limitation on literal sregexes. |
Date: |
Fri, 10 Sep 2010 19:08:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Breanndán Ó Nualláin <address@hidden> writes:
> Currently, the `sregexq' macro accepts only literal sregexes as args.
> The patch permits it to accept all kinds of macro-generated goodness.
> A simple example:
>
> (let ((forms '("abc" "def")))
> (sregexq `(or ,@forms)))
That's what sregex is for. The point of the sregexq macro is that it
quotes its argument.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--- End Message ---