GNU bug report logs -
#1299
lispref - searching.texi: Updating of looking-back arguments and return values in the example
Previous Next
Reported by: Seweryn Kokot <sewkokot <at> gmail.com>
Date: Sun, 2 Nov 2008 19:10:04 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1299 in the body.
You can then email your comments to 1299 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1299
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Seweryn Kokot <sewkokot <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
See the diff attached. Note that I copied the explanation for greedy
argument of `looking-back' function. Because I'm not a native speaker
so probably this paragraph requires some rephrasing.
[searching.diff (text/x-diff, inline)]
diff -ud /home/sewi/emacs_cvs/emacs/doc/lispref/searching.texi /home/sewi/emacs_cvs/emacs/doc/lispref/searching_cor.texi
--- /home/sewi/zrodla/elisp_files/emacs_cvs/emacs/doc/lispref/searching.texi 2008-11-02 19:39:21.000000000 +0100
+++ /home/sewi/zrodla/elisp_files/emacs_cvs/emacs/doc/lispref/searching_cor.texi 2008-11-02 19:54:10.000000000 +0100
@@ -1094,7 +1094,7 @@
@end example
@end defun
-@defun looking-back regexp &optional limit
+@defun looking-back regexp &optional limit greedy
This function returns @code{t} if @var{regexp} matches text before
point, ending at point, and @code{nil} otherwise.
@@ -1105,6 +1105,10 @@
not to search before @var{limit}. In this case, the match that is
found must begin at or after @var{limit}.
+If greedy is non-nil, extend the match backwards as far as possible,
+stopping when a single additional previous character cannot be part
+of a match for regexp.
+
@example
@group
---------- Buffer: foo ----------
@@ -1408,7 +1412,7 @@
(re-search-forward "The \\(cat \\)")
(match-beginning 0)
(match-beginning 1))
- @result{} (9 9 13)
+ @result{} (17 9 13)
@end group
@group
Diff finished. Sun Nov 2 19:54:17 2008
[Message part 3 (text/plain, inline)]
--
regards,
Seweryn Kokot
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1299
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 1299 <at> emacsbugs.donarmstrong.com (full text, mbox):
> See the diff attached. Note that I copied the explanation for greedy
> argument of `looking-back' function. Because I'm not a native speaker
> so probably this paragraph requires some rephrasing.
FWIW, it might not harm to also resolve the contradiction that REGEXP
can match _before_ LIMIT when GREEDY is non-nil (in the manual _and_ the
doc-string).
martin
Reply sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Seweryn Kokot <sewkokot <at> gmail.com>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #15 received at 1299-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Seweryn Kokot <sewkokot <at> gmail.com> wrote:
> See the diff attached. Note that I copied the explanation for greedy
> argument of `looking-back' function.
Thanks. I've checked in your patch with some minor modifications.
martin rudalics <rudalics <at> gmx.at> wrote:
> FWIW, it might not harm to also resolve the contradiction that REGEXP
> can match _before_ LIMIT when GREEDY is non-nil (in the manual _and_
> the doc-string).
I noted this in the manual and the doc-string. Thanks.
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Tue, 02 Dec 2008 15:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 207 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.