]> git.eshelyaron.com Git - emacs.git/commit
occur: Add bindings for next-error-no-select
authorTino Calancha <tino.calancha@gmail.com>
Sun, 31 May 2020 10:31:27 +0000 (12:31 +0200)
committerTino Calancha <tino.calancha@gmail.com>
Sun, 31 May 2020 10:31:27 +0000 (12:31 +0200)
commitabe7c22da96694ced1bc80ec7eb9eb8a662a568b
treefe3b5f03fd32b3ab65738a27e0721052cc250940
parent780f674a82a90c4e3e32583059b498bfa57e4a06
occur: Add bindings for next-error-no-select

Make the navigation in the occur buffer closer
to the navigation in the compilation buffer.

Add bindings to navigate the occur matches (Bug#39121).
Honor `next-error-highlight' and `next-error-highlight-no-select'
when navigating the occurrences.

* lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay):
New variables.
(occur-1): Set `occur-highlight-regexp' to the searched regexp.
(occur-goto-locus-delete-o, occur--highlight-occurrence): New defuns.
(occur-mode-display-occurrence, occur-mode-goto-occurrence):
Use `occur--highlight-occurrence'.
(occur-mode-map): Bind n to `next-error-no-select'
and p to `previous-error-no-select'

* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
Announce this change.

* test/lisp/replace-tests.el (replace-tests-with-highlighted-occurrence):
Add helper macro.
(occur-highlight-occurrence): Add test.
etc/NEWS
lisp/replace.el
test/lisp/replace-tests.el