Commit graph

45 commits

Author SHA1 Message Date
Paul Eggert
91af3942e9 Spelling fixes. 2011-11-14 15:59:56 -08:00
Chong Yidong
6420d28b9a Add rx.el support for numbered groups (Bug#8776).
* lisp/emacs-lisp/rx.el (rx-constituents): Add support for numbered groups.
(rx-submatch-n): New function.
(rx): Document it.
2011-06-18 17:12:33 -04:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
1f6f772201 * lisp/emacs-lisp/rx.el (rx-repeat): Replace CL function. 2011-01-04 23:04:51 -08:00
Andreas Schwab
8ee2dc5cff * lisp/emacs-lisp/rx.el (rx-syntax): Fix typo. 2010-12-30 16:15:34 +01:00
Stefan Monnier
723ee192a5 * lisp/emacs-lisp/rx.el: Make it a superset of sregex.
(rx-constituents): Add `any => "."', mark `repeat' as taking any number
of args, add `regex' alias.
(rx-info): Add arg to distinguish head and standalone forms.
(rx-check, rx-form): Pass the corresponding arg.
(rx-**): Simplify.
(rx-repeat): Make it work for any number of args.
(rx-syntax): Make it accept syntax chars as is.
* lisp/obsolete/sregex.el: Move from emacs-lisp/.
* lisp/emacs-lisp/re-builder.el: Remove sregex support.
* lisp/emacs-lisp/edebug.el (sregexq, rx): Remove redundant defs.
2010-12-26 18:17:09 -05:00
Stefan Monnier
19fe13dfd1 * emacs-lisp/rx.el (rx-any): Don't explode ranges that end in - or ].
(rx-any-condense-range): Explode 2-char ranges.

Fixes: debbugs:6984
2010-09-05 11:44:55 +02:00
Leo Liu
a354ac6a0c emacs-lisp/rx.el (rx): Doc fix. (Bug#6537) 2010-06-29 14:09:07 +02:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Chong Yidong
baac7510a4 (rx): Doc fix. 2008-12-28 04:19:34 +00:00
Stefan Monnier
e9e9c7b891 (rx-submatch): Pass : to rx-form (bug#1518). 2008-12-09 21:17:09 +00:00
Chong Yidong
5dbe5c8fb7 (rx-constituents): Change `anything' to call
rx-anything. Change `not-wordchar' assignment to "\\W" from
"[^[:word:]]".
(rx-group-if): New function.
(rx-parent): New variable.
(rx-and, rx-or): Put shy groups only when necessary.
(rx-bracket): Remove.
(rx-anything): New function.
(rx-any-delete-from-range, rx-any-condense-range)
(rx-check-any-string): New functions.
(rx-check-any): Return result as a list. Don't convert chars to
strings. Don't prepend "\\" to "^". Don't search for close
bracket. Check char category string. Call rx-form instead of
rx-to-string.
(rx-any): Rebuid to complete the function.
(rx-check-not): Fix char category regexp pattern string. Call
rx-form instead of rx-to-string.
(rx-not): Call rx-form instead of rx-to-string. Convert "[^]" to
"[^^]". Call regexp-quote for one char string when not called from
rx-not. Add "\\w", and toggle to upcase. Add the case of
"\\[SCBW]" to toggle.
(rx-=, rx->=, rx -**, rx-repeat, rx-submatch): Call rx-form
instead of rx-to-string.
(rx-kleene): Call rx-form instead of rx-to-string. Call
rx-group-if to adjust putting of shy groups.
(rx-atomic-p): Make check more precisely.
(rx-eval, rx-greedy): Call rx-form instead of rx-to-string.
(rx-regexp): Call rx-group-if.
(rx-form): New function.
(rx-to-string): Call rx-form, rx-group-if. Refine definition of
NO-GROUP.
2008-10-07 18:08:26 +00:00
Stefan Monnier
716c808a99 (rx): Docstring fix. 2008-10-03 14:12:31 +00:00
Glenn Morris
07e810660a Trent W. Buck <trentbuck at gmail.com> (tiny change)
(rx): Doc fix.
2008-06-04 07:12:44 +00:00
Glenn Morris
d6cba7ae45 Switch to recommended form of GPLv3 permissions notice. 2008-05-06 03:21:21 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
8b72699e88 Add 2008 to copyright years. 2008-01-07 01:14:52 +00:00
Michaël Cadilhac
e8449cdb49 (rx): Fix typo in docstring. 2007-09-05 16:24:59 +00:00
Miles Bader
37cc095b6a Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-851
2007-08-13 13:41:28 +00:00
Glenn Morris
ab2d877d45 Replace `iff' in doc-strings and comments. 2007-08-08 07:17:12 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
e0085d62fa Switch license to GPLv3 or later. 2007-07-25 04:14:29 +00:00
Stefan Monnier
f61fd6b7c3 (rx-constituents): Fix up `anything'. 2007-06-30 18:49:41 +00:00
Glenn Morris
5e3fc9eb8e Nikolaj Schumacher <n_schumacher at web.de> (tiny change)
(rx): Doc fix.
2007-05-29 00:53:54 +00:00
Glenn Morris
5fedce2cb9 Nikolaj Schumacher <n_schumacher at web.de> (tiny change)
(rx): Doc fix.
2007-05-29 00:52:08 +00:00
Glenn Morris
f0fa15c5e5 Add 2007 to copyright years. 2007-01-21 02:48:43 +00:00
Eli Zaretskii
a6966c1ce7 (rx-check-any, rx-check-not): Quote "]"s in regexps when they have no
special meaning.
2006-03-03 12:20:26 +00:00
Thien-Thi Nguyen
ceb4c4d303 Update years in copyright notice; nfc. 2006-02-06 12:31:40 +00:00
Thien-Thi Nguyen
3731a85096 Update years in copyright notice; nfc. 2005-08-06 17:48:15 +00:00
Lute Kamstra
3a35cf56e7 Update FSF's address. 2005-07-04 17:55:18 +00:00
Stefan Monnier
b62c13c2bd (rx-constituents): Add symbol-start and symbol-end. 2005-03-25 14:23:11 +00:00
Stefan Monnier
09c774f713 (rx-syntax): Move sregex style syntax to code.
(rx-bracket, rx-check-any, rx-any): Clean up name space.
2004-04-23 21:25:58 +00:00
Stefan Monnier
ccfbe67988 Doc fixes.
(rx-constituents): Add/extend many forms.
(rx-check): Check form is a list.
(bracket): Defvar.
(rx-check-any, rx-any, rx-check-not): Modify.
(rx-not): Simplify.
(rx-trans-forms, rx-=, rx->=, rx-**, rx-not-char, rx-not-syntax): New.
(rx-kleene): Use rx-trans-forms.
(rx-quote-for-set): Delete.
(rx): Allow multiple args.
2004-04-23 21:23:29 +00:00
Eli Zaretskii
05ec033b10 (rx): Work at compile time, not run time. 2004-03-27 11:52:07 +00:00
Stefan Monnier
d08c4c2857 Fix copyright. 2004-03-22 15:38:14 +00:00
Juanma Barranquero
942269e7b4 (rx): Work at compile time, not run time. 2004-03-21 15:34:56 +00:00
Eli Zaretskii
740b7c2dbb (rx-check, rx-check-any, rx-check-not)
(rx-repeat, rx-check-backref, rx-syntax, rx-to-string): Use
lower-case "rx" in all error message.
(rx-or): Put group around result.
(rx-constituents): Add backref.
(rx-syntax): Add string-delimiter, comment-delimiter.
(rx-categories): Add combining-diacritic.
(rx-check-not, rx-greedy, rx): Doc fix.
(rx-backref, rx-check-backref): New.
2004-02-16 16:51:39 +00:00
Eli Zaretskii
062a9fce99 (rx-not): Bind case-fold-search to nil. 2004-02-16 12:12:02 +00:00
Eli Zaretskii
cdddbfd273 (rx-or): Fix the case of "(rx (and ?a (or ?b ?c) ?d))". 2003-11-01 17:35:49 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Juanma Barranquero
a1506d2977 Trailing whitepace deleted. 2003-02-04 13:24:35 +00:00
Richard M. Stallman
c53f9b3b9c (rx-and): Generate a shy group.
Specify `no-group' when calling rx-to-string.
(rx-submatch): Specify `no-group' when calling rx-to-string.
(rx-kleene): Use rx-atomic-p to decide whether to make a group.
(rx-atomic-p): New function.
2002-12-23 17:43:24 +00:00
Juanma Barranquero
0a6cac62de (rx): Fix spacing. 2002-09-06 07:14:12 +00:00
Gerd Moellmann
12c6450376 *** empty log message *** 2001-10-01 07:31:59 +00:00