emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#7010: closed ([PATCH] sregex.el: Ease limitation


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7010: closed ([PATCH] sregex.el: Ease limitation on literal sregexes.)
Date: Fri, 10 Sep 2010 17:07:01 +0000

Your message dated Fri, 10 Sep 2010 19:08:08 +0200
with message-id <address@hidden>
and subject line Re: bug#7010: [PATCH] sregex.el: Ease limitation on literal 
sregexes.
has caused the GNU bug report #7010,
regarding [PATCH] sregex.el: Ease limitation on literal sregexes.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7010: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7010
GNU Bug Tracking System
Contact address@hidden with problems
--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]