[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7010: [PATCH] sregex.el: Ease limitation on literal sregexes.
From: |
Breanndán Ó Nualláin |
Subject: |
bug#7010: [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
- bug#7010: [PATCH] sregex.el: Ease limitation on literal sregexes.,
Breanndán Ó Nualláin <=