diff options
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index f81c6f53914..f09868cc6d3 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -732,6 +732,8 @@ Compatibility function for \\[next-error] invocations." | |||
| 732 | #'previous-single-property-change | 732 | #'previous-single-property-change |
| 733 | #'next-single-property-change) | 733 | #'next-single-property-change) |
| 734 | "No more matches") | 734 | "No more matches") |
| 735 | ;; In case the *Occur* buffer is visible in a nonselected window. | ||
| 736 | (set-window-point (get-buffer-window (current-buffer)) (point)) | ||
| 735 | (occur-mode-goto-occurrence)) | 737 | (occur-mode-goto-occurrence)) |
| 736 | 738 | ||
| 737 | 739 | ||
| @@ -1009,9 +1011,11 @@ See also `multi-occur'." | |||
| 1009 | ;; concatenate them all together. | 1011 | ;; concatenate them all together. |
| 1010 | (apply #'concat | 1012 | (apply #'concat |
| 1011 | (nconc | 1013 | (nconc |
| 1012 | (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) keep-props)))) | 1014 | (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ (abs nlines))) keep-props)))) |
| 1013 | (list out-line) | 1015 | (list out-line) |
| 1014 | (occur-engine-add-prefix (cdr (occur-accumulate-lines (1+ nlines) keep-props)))))))) | 1016 | (if (> nlines 0) |
| 1017 | (occur-engine-add-prefix | ||
| 1018 | (cdr (occur-accumulate-lines (1+ nlines) keep-props))))))))) | ||
| 1015 | ;; Actually insert the match display data | 1019 | ;; Actually insert the match display data |
| 1016 | (with-current-buffer out-buf | 1020 | (with-current-buffer out-buf |
| 1017 | (let ((beg (point)) | 1021 | (let ((beg (point)) |