summaryrefslogtreecommitdiff
path: root/lisp/obsolete/sregex.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/obsolete/sregex.el')
-rw-r--r--lisp/obsolete/sregex.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el
index ed2f3f3d8b6..de0b1d913ba 100644
--- a/lisp/obsolete/sregex.el
+++ b/lisp/obsolete/sregex.el
@@ -1,6 +1,6 @@
;;; sregex.el --- symbolic regular expressions
-;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2015 Free Software Foundation, Inc.
;; Author: Bob Glickstein <bobg+sregex@zanshin.com>
;; Maintainer: Bob Glickstein <bobg+sregex@zanshin.com>
@@ -262,15 +262,15 @@
This is exactly like `sregexq' (q.v.) except that it evaluates all its
arguments, so literal sregex clauses must be quoted. For example:
- (sregex '(or \"Bob\" \"Robert\")) => \"Bob\\\\|Robert\"
+ (sregex \\='(or \"Bob\" \"Robert\")) => \"Bob\\\\|Robert\"
An argument-evaluating sregex interpreter lets you reuse sregex
subexpressions:
- (let ((dotstar '(0+ any))
- (whitespace '(1+ (syntax ?-)))
- (digits '(1+ (char (?0 . ?9)))))
- (sregex 'bol dotstar \":\" whitespace digits)) => \"^.*:\\\\s-+[0-9]+\""
+ (let ((dotstar \\='(0+ any))
+ (whitespace \\='(1+ (syntax ?-)))
+ (digits \\='(1+ (char (?0 . ?9)))))
+ (sregex \\='bol dotstar \":\" whitespace digits)) => \"^.*:\\\\s-+[0-9]+\""
(sregex--sequence exps nil))
(defmacro sregexq (&rest exps)
@@ -338,15 +338,15 @@ computed (i.e., non-constant) values in `sregexq' expressions. So
automatically quote its values. Literal sregex clauses must be
explicitly quoted like so:
- (sregex '(or \"Bob\" \"Robert\")) => \"Bob\\\\|Robert\"
+ (sregex \\='(or \"Bob\" \"Robert\")) => \"Bob\\\\|Robert\"
but computed clauses can be included easily, allowing for the reuse
of common clauses:
- (let ((dotstar '(0+ any))
- (whitespace '(1+ (syntax ?-)))
- (digits '(1+ (char (?0 . ?9)))))
- (sregex 'bol dotstar \":\" whitespace digits)) => \"^.*:\\\\s-+[0-9]+\"
+ (let ((dotstar \\='(0+ any))
+ (whitespace \\='(1+ (syntax ?-)))
+ (digits \\='(1+ (char (?0 . ?9)))))
+ (sregex \\='bol dotstar \":\" whitespace digits)) => \"^.*:\\\\s-+[0-9]+\"
Here are the clauses allowed in an `sregex' or `sregexq' expression:
@@ -416,7 +416,7 @@ Here are the clauses allowed in an `sregex' or `sregexq' expression:
given set. See below for how to construct a CHAR-CLAUSE.
- the symbol `bot'
- Stands for \"\\\\`\", matching the empty string at the beginning of
+ Stands for \"\\\\\\=`\", matching the empty string at the beginning of
text (beginning of a string or of a buffer).
- the symbol `eot'