From f153a4f78ef24ebc2901c51c279bb2b55ea2473d Mon Sep 17 00:00:00 2001 From: Nathan Moreau Date: Wed, 16 Aug 2017 23:37:59 +0200 Subject: [PATCH] Fix current buffer in the call of occur-next-error. Try to mimic the structure of compilation-next-error-function in occur-next-error. --- lisp/replace.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index 09972b40db..439bb63a18 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1273,8 +1273,8 @@ occur-next-error "No more matches") ;; In case the *Occur* buffer is visible in a nonselected window. (let ((win (get-buffer-window (current-buffer) t))) - (if win (set-window-point win (point)))) - (occur-mode-goto-occurrence))) + (if win (set-window-point win (point))))) + (occur-mode-goto-occurrence)) (defface match '((((class color) (min-colors 88) (background light)) -- 2.11.0