summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-08-10 02:12:04 +0000
committerRichard M. Stallman <rms@gnu.org>1998-08-10 02:12:04 +0000
commit952cad898009bb7ea31319b80ce35f527faef58b (patch)
tree81301e59d706538e5edf164cd6ca33ed49170fde /lisp/emacs-lisp
parent3f8309db3c4d55544f7033a47cb55b1edbf34ff1 (diff)
downloademacs-952cad898009bb7ea31319b80ce35f527faef58b.tar.gz
emacs-952cad898009bb7ea31319b80ce35f527faef58b.tar.bz2
emacs-952cad898009bb7ea31319b80ce35f527faef58b.zip
(sregex-replace-match): Don't call sregex--value-groups.
(sregex-match-end, sregex-match-beginning): Likewise. (sregex-match-string-no-properties, sregex-match-string): Likewise.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/sregex.el25
1 files changed, 5 insertions, 20 deletions
diff --git a/lisp/emacs-lisp/sregex.el b/lisp/emacs-lisp/sregex.el
index 38f4326f3ab..09fc2313675 100644
--- a/lisp/emacs-lisp/sregex.el
+++ b/lisp/emacs-lisp/sregex.el
@@ -333,10 +333,7 @@ to allow for \"introduced groups\". If the extra argument is omitted
or nil, it defaults to the current value of (sregex-info)."
(replace-match replacement fixedcase literal string
(and subexp
- (sregex-backref-num
- subexp
- (sregex--value-groups (or sregex
- sregex--current-sregex))))))
+ (sregex-backref-num subexp sregex))))
(defun sregex-match-string (count &optional in-string sregex)
"Like `match-string', for a regexp made with `sregex'.
@@ -345,10 +342,7 @@ can be obtained with `sregex-info'. The COUNT argument is adjusted to
allow for \"introduced groups\". If the extra argument is omitted or
nil, it defaults to the current value of (sregex-info)."
(match-string (and count
- (sregex-backref-num
- count
- (sregex--value-groups (or sregex
- sregex--current-sregex))))
+ (sregex-backref-num count sregex))
in-string))
(defun sregex-match-string-no-properties (count &optional in-string sregex)
@@ -359,10 +353,7 @@ allow for \"introduced groups\". If the extra argument is omitted or
nil, it defaults to the current value of (sregex-info)."
(match-string-no-properties
(and count
- (sregex-backref-num
- count
- (sregex--value-groups (or sregex
- sregex--current-sregex))))
+ (sregex-backref-num count sregex))
in-string))
(defun sregex-match-beginning (count &optional sregex)
@@ -371,10 +362,7 @@ This takes one additional optional argument, the `sregex' info, which
can be obtained with `sregex-info'. The COUNT argument is adjusted to
allow for \"introduced groups\". If the extra argument is omitted or
nil, it defaults to the current value of (sregex-info)."
- (match-beginning (sregex-backref-num
- count
- (sregex--value-groups (or sregex
- sregex--current-sregex)))))
+ (match-beginning (sregex-backref-num count sregex)))
(defun sregex-match-end (count &optional sregex)
"Like `match-end', for a regexp made with `sregex'.
@@ -382,10 +370,7 @@ This takes one additional optional argument, the `sregex' info, which
can be obtained with `sregex-info'. The COUNT argument is adjusted to
allow for \"introduced groups\". If the extra argument is omitted or
nil, it defaults to the current value of (sregex-info)."
- (match-end (sregex-backref-num
- count
- (sregex--value-groups (or sregex
- sregex--current-sregex)))))
+ (match-end (sregex-backref-num count sregex)))
(defun sregex-match-data (&optional sregex)
"Like `match-data', for a regexp made with `sregex'.