diff options
| author | Eli Zaretskii | 2016-01-13 20:36:11 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-13 20:36:11 +0200 |
| commit | 53fb7e6e5da541e0b5f6b203f567cb5900185e21 (patch) | |
| tree | a20b21062f6304ca32383f3f66d4f03b103bcec7 | |
| parent | 3db8ce4fbd75b978d658df58810adf1deca04708 (diff) | |
| download | emacs-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.texi | 15 | ||||
| -rw-r--r-- | etc/NEWS | 2 |
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 |
| 1155 | This function returns @code{t} if @var{regexp} matches the text | 1155 | This function returns @code{t} if @var{regexp} matches the text |
| 1156 | immediately before point (i.e., ending at point), and @code{nil} otherwise. | 1156 | immediately before point (i.e., ending at point), and @code{nil} otherwise. |
| 1157 | 1157 | ||
| 1158 | Because regular expression matching works only going forward, this is | 1158 | Because regular expression matching works only going forward, this is |
| 1159 | implemented by searching backwards from point for a match that ends at | 1159 | implemented by searching backwards from point for a match that ends at |
| 1160 | point. That can be quite slow if it has to search a long distance. | 1160 | point. That can be quite slow if it has to search a long distance. |
| 1161 | You can bound the time required by specifying @var{limit}, which says | 1161 | You can bound the time required by specifying a non-@code{nil} value |
| 1162 | not to search before @var{limit}. In this case, the match that is | 1162 | for @var{limit}, which says not to search before @var{limit}. In this |
| 1163 | found must begin at or after @var{limit}. Here's an example: | 1163 | case, the match that is found must begin at or after @var{limit}. |
| 1164 | Here's an example: | ||
| 1164 | 1165 | ||
| 1165 | @example | 1166 | @example |
| 1166 | @group | 1167 | @group |
| @@ -1178,9 +1179,9 @@ comes back" twice. | |||
| 1178 | 1179 | ||
| 1179 | If @var{greedy} is non-@code{nil}, this function extends the match | 1180 | If @var{greedy} is non-@code{nil}, this function extends the match |
| 1180 | backwards as far as possible, stopping when a single additional | 1181 | backwards as far as possible, stopping when a single additional |
| 1181 | previous character cannot be part of a match for regexp. When the | 1182 | previous character cannot be part of a match for @var{regexp}. When |
| 1182 | match is extended, its starting position is allowed to occur before | 1183 | the match is extended, its starting position is allowed to occur |
| 1183 | @var{limit}. | 1184 | before @var{limit}. |
| 1184 | 1185 | ||
| 1185 | @c http://debbugs.gnu.org/5689 | 1186 | @c http://debbugs.gnu.org/5689 |
| 1186 | As a general recommendation, try to avoid using @code{looking-back} | 1187 | As a general recommendation, try to avoid using @code{looking-back} |
| @@ -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'. |
| 1354 | It is a bit easier to use than `pre-redisplay-function'. | 1354 | It 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. |
| 1358 | Previously, 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'. |
| 1359 | Replaced by properties `cursor-intangible' and `cursor-sensor-functions', | 1361 | Replaced by properties `cursor-intangible' and `cursor-sensor-functions', |