GNU bug report logs -
#31584
27.0.50; Document again what match re-search-backward finds
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Thu, 24 May 2018 21:32:02 UTC
Severity: minor
Tags: fixed
Found in version 27.0.50
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Michael Heerdegen <michael_heerdegen <at> web.de> writes:
> The anchor is in this paragraph:
>
> Nonincremental search for a regexp is done with the commands
> ‘re-search-forward’ and ‘re-search-backward’. [...]
Ah, no, the anchor (which I added as part of the patch) is in the elisp
manual, not the emacs manual.
<<<<<ANCHOR IS HERE>>>>>>
-- Command: re-search-backward regexp &optional limit noerror count
This function searches backward in the current buffer for a string
of text that is matched by the regular expression REGEXP, leaving
point at the beginning of the first text found.
This function is analogous to `re-search-forward', but they are not
simple mirror images. `re-search-forward' finds the match whose
beginning is as close as possible to the starting point. If
`re-search-backward' were a perfect mirror image, it would find the
match whose end is as close as possible. However, in fact it
finds the match whose beginning is as close as possible (and yet
ends before the starting point). The reason for this is that
matching a regular expression at a given spot always works from
beginning to end, and starts at a specified beginning position.
This bug report was last modified 6 years and 358 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.