Function: occur-mode-display-occurrence
occur-mode-display-occurrence is an interactive and byte-compiled
function defined in replace.el.gz.
Signature
(occur-mode-display-occurrence)
Documentation
Display in another window the occurrence the current line describes.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defun occur-mode-display-occurrence ()
"Display in another window the occurrence the current line describes."
(interactive)
(let* ((buffer (current-buffer))
(targets (occur-mode--find-occurrences))
(pos (occur--targets-start targets))
(next-error-highlight next-error-highlight-no-select)
(display-buffer-overriding-action
'(nil (inhibit-same-window . t)))
window)
(setq window (display-buffer (marker-buffer pos) t))
(occur--set-arrow)
;; This is the way to set point in the proper window.
(save-selected-window
(select-window window)
(goto-char pos)
(occur--highlight-occurrences targets)
(next-error-found buffer (current-buffer))
(run-hooks 'occur-mode-find-occurrence-hook))))