emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d3fcb92: Improve documentation of 'occur'


From: Eli Zaretskii
Subject: [Emacs-diffs] master d3fcb92: Improve documentation of 'occur'
Date: Sat, 29 Jul 2017 04:26:22 -0400 (EDT)

branch: master
commit d3fcb9241339357869969547924e02bed6f661cd
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Improve documentation of 'occur'
    
    * doc/emacs/search.texi (Other Repeating Search):
    * lisp/replace.el (occur): Make the documentation of 'occur' be
    more accurate when matches overlap.  (Bug#27818)
---
 doc/emacs/search.texi | 4 ++++
 lisp/replace.el       | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index c9e83da..9f7e9a1 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1747,6 +1747,10 @@ at the first match after such line.
 You can also run @kbd{M-s o} when an incremental search is active;
 this uses the current search string.
 
+Note that matches for the regexp you type are extended to include
+complete lines, and a match that starts before the previous match ends
+is not considered a match.
+
 @kindex RET @r{(Occur mode)}
 @kindex o @r{(Occur mode)}
 @kindex C-o @r{(Occur mode)}
diff --git a/lisp/replace.el b/lisp/replace.el
index 64dfe7d..a502494 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1395,6 +1395,11 @@ invoke `occur'."
   "Show all lines in the current buffer containing a match for REGEXP.
 If a match spreads across multiple lines, all those lines are shown.
 
+Each match is extended to include complete lines.  Only non-overlapping
+matches are considered.  (Note that extending matches to complete
+lines could cause some of the matches to overlap; if so, they will not
+be shown as separate matches.)
+
 Each line is displayed with NLINES lines before and after, or -NLINES
 before if NLINES is negative.
 NLINES defaults to `list-matching-lines-default-context-lines'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]