(occur-mode-goto-occurrence): Always switch in same window.
(save-excursion
(goto-char (posn-point (event-end event)))
(setq pos (occur-mode-find-occurrence))))
- (pop-to-buffer (marker-buffer pos))
+ (switch-to-buffer-other-window (marker-buffer pos))
(goto-char pos)))
(defun occur-mode-find-occurrence ()
"Go to the occurrence the current line describes."
(interactive)
(let ((pos (occur-mode-find-occurrence)))
- (pop-to-buffer (marker-buffer pos))
+ (switch-to-buffer (marker-buffer pos))
(goto-char pos)))
(defun occur-mode-goto-occurrence-other-window ()