aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-01-13 20:36:11 +0200
committerEli Zaretskii2016-01-13 20:36:11 +0200
commit53fb7e6e5da541e0b5f6b203f567cb5900185e21 (patch)
treea20b21062f6304ca32383f3f66d4f03b103bcec7
parent3db8ce4fbd75b978d658df58810adf1deca04708 (diff)
downloademacs-53fb7e6e5da541e0b5f6b203f567cb5900185e21.tar.gz
emacs-53fb7e6e5da541e0b5f6b203f567cb5900185e21.zip
Updater documentation of 'looking-back'
* doc/lispref/searching.texi (Regexp Search): Update documentation of 'looking-back'. Fix markup.
-rw-r--r--doc/lispref/searching.texi15
-rw-r--r--etc/NEWS2
2 files changed, 10 insertions, 7 deletions
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 5ff7ef1cf66..1243d720bc3 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -1151,16 +1151,17 @@ comes back" twice.
1151@end example 1151@end example
1152@end defun 1152@end defun
1153 1153
1154@defun looking-back regexp &optional limit greedy 1154@defun looking-back regexp limit &optional greedy
1155This function returns @code{t} if @var{regexp} matches the text 1155This function returns @code{t} if @var{regexp} matches the text
1156immediately before point (i.e., ending at point), and @code{nil} otherwise. 1156immediately before point (i.e., ending at point), and @code{nil} otherwise.
1157 1157
1158Because regular expression matching works only going forward, this is 1158Because regular expression matching works only going forward, this is
1159implemented by searching backwards from point for a match that ends at 1159implemented by searching backwards from point for a match that ends at
1160point. That can be quite slow if it has to search a long distance. 1160point. That can be quite slow if it has to search a long distance.
1161You can bound the time required by specifying @var{limit}, which says 1161You can bound the time required by specifying a non-@code{nil} value
1162not to search before @var{limit}. In this case, the match that is 1162for @var{limit}, which says not to search before @var{limit}. In this
1163found must begin at or after @var{limit}. Here's an example: 1163case, the match that is found must begin at or after @var{limit}.
1164Here's an example:
1164 1165
1165@example 1166@example
1166@group 1167@group
@@ -1178,9 +1179,9 @@ comes back" twice.
1178 1179
1179If @var{greedy} is non-@code{nil}, this function extends the match 1180If @var{greedy} is non-@code{nil}, this function extends the match
1180backwards as far as possible, stopping when a single additional 1181backwards as far as possible, stopping when a single additional
1181previous character cannot be part of a match for regexp. When the 1182previous character cannot be part of a match for @var{regexp}. When
1182match is extended, its starting position is allowed to occur before 1183the match is extended, its starting position is allowed to occur
1183@var{limit}. 1184before @var{limit}.
1184 1185
1185@c http://debbugs.gnu.org/5689 1186@c http://debbugs.gnu.org/5689
1186As a general recommendation, try to avoid using @code{looking-back} 1187As a general recommendation, try to avoid using @code{looking-back}
diff --git a/etc/NEWS b/etc/NEWS
index c51136faf63..7cea0c88da1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1353,7 +1353,9 @@ Previously, the default value of `nil' implied using `read'.
1353** New hook `pre-redisplay-functions'. 1353** New hook `pre-redisplay-functions'.
1354It is a bit easier to use than `pre-redisplay-function'. 1354It is a bit easier to use than `pre-redisplay-function'.
1355 1355
1356+++
1356** The second arg of `looking-back' should always be provided explicitly. 1357** The second arg of `looking-back' should always be provided explicitly.
1358Previously, it was an optional argument, now it's mandatory.
1357 1359
1358** Obsolete text properties `intangible', `point-entered', and `point-left'. 1360** Obsolete text properties `intangible', `point-entered', and `point-left'.
1359Replaced by properties `cursor-intangible' and `cursor-sensor-functions', 1361Replaced by properties `cursor-intangible' and `cursor-sensor-functions',