[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114478: Refine documentation of `looking-back'.
From: |
Xue Fuqiao |
Subject: |
[Emacs-diffs] trunk r114478: Refine documentation of `looking-back'. |
Date: |
Sun, 29 Sep 2013 06:16:44 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114478
revision-id: address@hidden
parent: address@hidden
committer: Xue Fuqiao <address@hidden>
branch nick: trunk
timestamp: Sun 2013-09-29 14:16:45 +0800
message:
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.
modified:
doc/lispref/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6155
doc/lispref/searching.texi
searching.texi-20091113204419-o5vbwnq5f7feedwu-6208
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/subr.el subr.el-20091113204419-o5vbwnq5f7feedwu-151
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2013-09-22 12:49:53 +0000
+++ b/doc/lispref/ChangeLog 2013-09-29 06:16:45 +0000
@@ -1,3 +1,7 @@
+2013-09-29 Xue Fuqiao <address@hidden>
+
+ * searching.texi (Regexp Search): Refine.
+
2013-09-22 Xue Fuqiao <address@hidden>
* nonascii.texi (Default Coding Systems): Typo fix.
=== modified file 'doc/lispref/searching.texi'
--- a/doc/lispref/searching.texi 2013-04-21 03:27:51 +0000
+++ b/doc/lispref/searching.texi 2013-09-29 06:16:45 +0000
@@ -1146,7 +1146,21 @@
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
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:
+
address@hidden
address@hidden
+---------- Buffer: foo ----------
+I read "@point{}The cat in the hat
+comes back" twice.
+---------- Buffer: foo ----------
+
+(looking-back "read \"" 3)
+ @result{} t
+(looking-back "read \"" 4)
+ @result{} nil
address@hidden group
address@hidden example
If @var{greedy} is address@hidden, this function extends the match
backwards as far as possible, stopping when a single additional
@@ -1154,20 +1168,6 @@
match is extended, its starting position is allowed to occur before
@var{limit}.
address@hidden
address@hidden
----------- Buffer: foo ----------
-I read "@point{}The cat in the hat
-comes back" twice.
----------- Buffer: foo ----------
-
-(looking-back "read \"" 3)
- @result{} t
-(looking-back "read \"" 4)
- @result{} nil
address@hidden group
address@hidden example
-
@c http://debbugs.gnu.org/5689
As a general recommendation, try to avoid using @code{looking-back}
wherever possible, since it is slow. For this reason, there are no
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-28 17:17:01 +0000
+++ b/lisp/ChangeLog 2013-09-29 06:16:45 +0000
@@ -1,3 +1,7 @@
+2013-09-29 Xue Fuqiao <address@hidden>
+
+ * subr.el (looking-back): Do not recommend using looking-back.
+
2013-09-28 Alan Mackenzie <address@hidden>
Fix indentation/fontification of Java enum with "implements".
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2013-09-20 19:59:42 +0000
+++ b/lisp/subr.el 2013-09-29 06:16:45 +0000
@@ -3482,7 +3482,10 @@
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
-LIMIT."
+LIMIT.
+
+As a general recommendation, try to avoid using `looking-back'
+wherever possible, since it is slow."
(let ((start (point))
(pos
(save-excursion
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114478: Refine documentation of `looking-back'.,
Xue Fuqiao <=