diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2017-02-02 19:13:05 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2017-02-02 19:13:05 +0900 |
commit | 8e871aef10455eefc34790a9ec011c6fec5e93fe (patch) | |
tree | 37af01d0672a78348691b9de7560d516c725826a /doc/lispintro | |
parent | 141b085674e2945cc0c42bbe35548c368d1b023e (diff) | |
download | emacs-8e871aef10455eefc34790a9ec011c6fec5e93fe.tar.gz |
Allow occur command to operate on the region
See discussion in:
https://lists.gnu.org/archive/html/emacs-devel/2016-12/msg01084.html
* lisp/replace.el (occur--region-start, occur--region-end)
(occur--matches-threshold): New variables.
(occur-engine): Use them.
(occur): Idem.
Add optional arg REGION; if non-nil occur applies in that region.
* doc/lispintro/emacs-lisp-intro.texi (Keybindings): Update manual
* doc/emacs/search.texi (Other Repeating Search): Idem.
; etc/NEWS: Add entry for the new feature.
Diffstat (limited to 'doc/lispintro')
-rw-r--r-- | doc/lispintro/emacs-lisp-intro.texi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 830c072cf5e..36d767737df 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -17151,9 +17151,11 @@ Here is another keybinding, with a comment: @findex occur The @code{occur} command shows all the lines in the current buffer -that contain a match for a regular expression. Matching lines are -shown in a buffer called @file{*Occur*}. That buffer serves as a menu -to jump to occurrences. +that contain a match for a regular expression. When the region is +active, @code{occur} restricts matches to such region. Otherwise it +uses the entire buffer. +Matching lines are shown in a buffer called @file{*Occur*}. +That buffer serves as a menu to jump to occurrences. @findex global-unset-key @cindex Unbinding key |