Function: occur-next-error

occur-next-error is an interactive and byte-compiled function defined in replace.el.gz.

Signature

(occur-next-error &optional ARGP RESET)

Documentation

Move to the ARGPth (default 1) next match in an Occur mode buffer.

RESET non-nil means rewind to the first match. This is a compatibility function for C-x ` (next-error) invocations.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defun occur-next-error (&optional argp reset)
  "Move to the ARGPth (default 1) next match in an Occur mode buffer.
RESET non-nil means rewind to the first match.
This is a compatibility function for \\[next-error] invocations."
  (interactive "p")
  (goto-char (cond (reset (point-min))
		   ((< argp 0) (line-beginning-position))
		   ((> argp 0) (line-end-position))
		   ((point))))
  (occur-find-match
   (abs argp)
   (if (> 0 argp)
       #'previous-single-property-change
     #'next-single-property-change)
   "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))