[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog emacs-lisp/rx.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog emacs-lisp/rx.el |
Date: |
Tue, 09 Dec 2008 21:17:18 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/12/09 21:17:17
Modified files:
lisp : ChangeLog
lisp/emacs-lisp: rx.el
Log message:
(rx-submatch): Pass : to rx-form (bug#1518).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.14923&r2=1.14924
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emacs-lisp/rx.el?cvsroot=emacs&r1=1.29&r2=1.30
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.14923
retrieving revision 1.14924
diff -u -b -r1.14923 -r1.14924
--- ChangeLog 9 Dec 2008 03:59:29 -0000 1.14923
+++ ChangeLog 9 Dec 2008 21:17:09 -0000 1.14924
@@ -1,3 +1,7 @@
+2008-12-09 Stefan Monnier <address@hidden>
+
+ * emacs-lisp/rx.el (rx-submatch): Pass : to rx-form.
+
2008-12-09 Glenn Morris <address@hidden>
* Makefile.in (ELCFILES): Update.
Index: emacs-lisp/rx.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/rx.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- emacs-lisp/rx.el 7 Oct 2008 18:08:26 -0000 1.29
+++ emacs-lisp/rx.el 9 Dec 2008 21:17:17 -0000 1.30
@@ -666,7 +666,13 @@
(defun rx-submatch (form)
"Parse and produce code from FORM, which is `(submatch ...)'."
- (concat "\\(" (mapconcat #'rx-form (cdr form) nil) "\\)"))
+ (concat "\\("
+ (if (= 2 (length form))
+ ;; Only one sub-form.
+ (rx-form (cadr form))
+ ;; Several sub-forms implicitly concatenated.
+ (mapconcat (lambda (re) (rx-form re ':)) (cdr form) nil))
+ "\\)"))
(defun rx-backref (form)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog emacs-lisp/rx.el,
Stefan Monnier <=