Commit f22a7406 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(occur-next-error): Call set-window-point.

(occur-engine): Handle negative NLINES.
parent fc820cc5
......@@ -732,6 +732,8 @@ Compatibility function for \\[next-error] invocations."
"No more matches")
;; In case the *Occur* buffer is visible in a nonselected window.
(set-window-point (get-buffer-window (current-buffer)) (point))
......@@ -1009,9 +1011,11 @@ See also `multi-occur'."
;; concatenate them all together.
(apply #'concat
(occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) keep-props))))
(occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ (abs nlines))) keep-props))))
(list out-line)
(occur-engine-add-prefix (cdr (occur-accumulate-lines (1+ nlines) keep-props))))))))
(if (> nlines 0)
(cdr (occur-accumulate-lines (1+ nlines) keep-props)))))))))
;; Actually insert the match display data
(with-current-buffer out-buf
(let ((beg (point))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment