diff options
| author | Juri Linkov | 2010-03-30 19:03:08 +0300 |
|---|---|---|
| committer | Juri Linkov | 2010-03-30 19:03:08 +0300 |
| commit | dc2d2590b24f7e4ee648b5d073ba744fbda7a4d8 (patch) | |
| tree | 8d15261ebed74c762df72b14eb4023534c784520 /doc | |
| parent | 47c88c067f98772d5b505d7b6ad3d0909da5f68a (diff) | |
| download | emacs-dc2d2590b24f7e4ee648b5d073ba744fbda7a4d8.tar.gz emacs-dc2d2590b24f7e4ee648b5d073ba744fbda7a4d8.zip | |
Make occur handle multi-line matches cleanly with context.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html
* replace.el (occur-accumulate-lines): Add optional arg `pt'.
(occur-engine): Add local variables `ret', `prev-after-lines',
`prev-lines'. Use more arguments for `occur-context-lines'.
Set first elem of its returned list to `data', and the second elem
to `prev-after-lines'. Don't print the separator line.
In the end, print remaining context after-lines.
(occur-context-lines): Add new arguments `begpt', `endpt',
`lines', `prev-lines', `prev-after-lines'. Rewrite to combine
after-lines of the previous match with before-lines of the
current match and not overlap them. Return a list with two
values: the output line and the list of context after-lines.
* search.texi (Other Repeating Search): Remove line that `occur'
can not handle multiline matches.
* occur-testsuite.el (occur-tests): Add tests for context lines.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index e23f129a168..b13b3ac1eec 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-03-30 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * search.texi (Other Repeating Search): Remove line that `occur' | ||
| 4 | can not handle multiline matches. | ||
| 5 | |||
| 1 | 2010-03-30 Eli Zaretskii <eliz@gnu.org> | 6 | 2010-03-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * mule.texi (International): Mention support of bidirectional editing. | 8 | * mule.texi (International): Mention support of bidirectional editing. |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 8c49a3fa699..890dd48df9f 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -1311,8 +1311,7 @@ Prompt for a regexp, and display a list showing each line in the | |||
| 1311 | buffer that contains a match for it. To limit the search to part of | 1311 | buffer that contains a match for it. To limit the search to part of |
| 1312 | the buffer, narrow to that part (@pxref{Narrowing}). A numeric | 1312 | the buffer, narrow to that part (@pxref{Narrowing}). A numeric |
| 1313 | argument @var{n} specifies that @var{n} lines of context are to be | 1313 | argument @var{n} specifies that @var{n} lines of context are to be |
| 1314 | displayed before and after each matching line. Currently, | 1314 | displayed before and after each matching line. |
| 1315 | @code{occur} can not correctly handle multiline matches. | ||
| 1316 | 1315 | ||
| 1317 | @kindex RET @r{(Occur mode)} | 1316 | @kindex RET @r{(Occur mode)} |
| 1318 | @kindex o @r{(Occur mode)} | 1317 | @kindex o @r{(Occur mode)} |