mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-06 20:49:33 +00:00
Refine documentation of `looking-back'.
* lisp/subr.el (looking-back): Do not recommend using looking-back. (bug#5689) * doc/lispref/searching.texi (Regexp Search): Refine.
This commit is contained in:
parent
4ec3c26861
commit
6cfe977d9f
@ -1,3 +1,7 @@
|
|||||||
|
2013-09-29 Xue Fuqiao <xfq.free@gmail.com>
|
||||||
|
|
||||||
|
* searching.texi (Regexp Search): Refine.
|
||||||
|
|
||||||
2013-09-22 Xue Fuqiao <xfq.free@gmail.com>
|
2013-09-22 Xue Fuqiao <xfq.free@gmail.com>
|
||||||
|
|
||||||
* nonascii.texi (Default Coding Systems): Typo fix.
|
* nonascii.texi (Default Coding Systems): Typo fix.
|
||||||
|
@ -1146,13 +1146,7 @@ implemented by searching backwards from point for a match that ends at
|
|||||||
point. That can be quite slow if it has to search a long distance.
|
point. That can be quite slow if it has to search a long distance.
|
||||||
You can bound the time required by specifying @var{limit}, which says
|
You can bound the time required by specifying @var{limit}, which says
|
||||||
not to search before @var{limit}. In this case, the match that is
|
not to search before @var{limit}. In this case, the match that is
|
||||||
found must begin at or after @var{limit}.
|
found must begin at or after @var{limit}. Here's an example:
|
||||||
|
|
||||||
If @var{greedy} is non-@code{nil}, this function extends the match
|
|
||||||
backwards as far as possible, stopping when a single additional
|
|
||||||
previous character cannot be part of a match for regexp. When the
|
|
||||||
match is extended, its starting position is allowed to occur before
|
|
||||||
@var{limit}.
|
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
@ -1168,6 +1162,12 @@ comes back" twice.
|
|||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
If @var{greedy} is non-@code{nil}, this function extends the match
|
||||||
|
backwards as far as possible, stopping when a single additional
|
||||||
|
previous character cannot be part of a match for regexp. When the
|
||||||
|
match is extended, its starting position is allowed to occur before
|
||||||
|
@var{limit}.
|
||||||
|
|
||||||
@c http://debbugs.gnu.org/5689
|
@c http://debbugs.gnu.org/5689
|
||||||
As a general recommendation, try to avoid using @code{looking-back}
|
As a general recommendation, try to avoid using @code{looking-back}
|
||||||
wherever possible, since it is slow. For this reason, there are no
|
wherever possible, since it is slow. For this reason, there are no
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2013-09-29 Xue Fuqiao <xfq.free@gmail.com>
|
||||||
|
|
||||||
|
* subr.el (looking-back): Do not recommend using looking-back.
|
||||||
|
|
||||||
2013-09-28 Alan Mackenzie <acm@muc.de>
|
2013-09-28 Alan Mackenzie <acm@muc.de>
|
||||||
|
|
||||||
Fix indentation/fontification of Java enum with "implements".
|
Fix indentation/fontification of Java enum with "implements".
|
||||||
|
@ -3482,7 +3482,10 @@ If GREEDY is non-nil, extend the match backwards as far as
|
|||||||
possible, stopping when a single additional previous character
|
possible, stopping when a single additional previous character
|
||||||
cannot be part of a match for REGEXP. When the match is
|
cannot be part of a match for REGEXP. When the match is
|
||||||
extended, its starting position is allowed to occur before
|
extended, its starting position is allowed to occur before
|
||||||
LIMIT."
|
LIMIT.
|
||||||
|
|
||||||
|
As a general recommendation, try to avoid using `looking-back'
|
||||||
|
wherever possible, since it is slow."
|
||||||
(let ((start (point))
|
(let ((start (point))
|
||||||
(pos
|
(pos
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user