summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-09-11 04:10:15 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-09-11 04:10:15 +0200
commit91054f8f7c6633efcd39eb883703f09346e0b936 (patch)
tree97373f960a70c929f0459ccd0b70f17e88cd82dc /lisp/subr.el
parentcec2eab875a23bf1331361727ade3fd233dd028c (diff)
downloademacs-91054f8f7c6633efcd39eb883703f09346e0b936.tar.gz
Doc string clarification.
* subr.el (match-string): Mention that the current buffer should be the same as the search was done in. Fixes: debbugs:9282
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index a2676b1173d..35fac1fe8f2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3249,7 +3249,9 @@ The value returned is the value of the last form in BODY."
NUM specifies which parenthesized expression in the last regexp.
Value is nil if NUMth pair didn't match, or there were less than NUM pairs.
Zero means the entire text matched by the whole regexp or whole string.
-STRING should be given if the last search was by `string-match' on STRING."
+STRING should be given if the last search was by `string-match' on STRING.
+If STRING is nil, the current buffer should be the same buffer
+the search/match was performed in."
(if (match-beginning num)
(if string
(substring string (match-beginning num) (match-end num))
@@ -3260,7 +3262,9 @@ STRING should be given if the last search was by `string-match' on STRING."
NUM specifies which parenthesized expression in the last regexp.
Value is nil if NUMth pair didn't match, or there were less than NUM pairs.
Zero means the entire text matched by the whole regexp or whole string.
-STRING should be given if the last search was by `string-match' on STRING."
+STRING should be given if the last search was by `string-match' on STRING.
+If STRING is nil, the current buffer should be the same buffer
+the search/match was performed in."
(if (match-beginning num)
(if string
(substring-no-properties string (match-beginning num)