diff options
| author | Juri Linkov | 2021-02-04 11:17:54 +0200 |
|---|---|---|
| committer | Juri Linkov | 2021-02-04 11:17:54 +0200 |
| commit | 5666955379e8ca82d072c1aba60a2c58ff3f855a (patch) | |
| tree | 401113476bec8e1a7b3feca9dd1f821c34d17bae | |
| parent | a8958640c4d8b17d6bc093d94741565276fa9e5f (diff) | |
| download | emacs-5666955379e8ca82d072c1aba60a2c58ff3f855a.tar.gz emacs-5666955379e8ca82d072c1aba60a2c58ff3f855a.zip | |
* lisp/replace.el (occur-rename-buffer): Check for overlay (bug#46268).
(occur-1): Don't use occur--garbage-collect-revert-args
when reverting the Occur buffer with same bufs.
| -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 f13d27aff89..d320542d629 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1545,7 +1545,10 @@ You can add this to `occur-hook' if you always want a separate | |||
| 1545 | (with-current-buffer | 1545 | (with-current-buffer |
| 1546 | (if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*")) | 1546 | (if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*")) |
| 1547 | (rename-buffer (concat "*Occur: " | 1547 | (rename-buffer (concat "*Occur: " |
| 1548 | (mapconcat #'buffer-name | 1548 | (mapconcat (lambda (boo) |
| 1549 | (buffer-name (if (overlayp boo) | ||
| 1550 | (overlay-buffer boo) | ||
| 1551 | boo))) | ||
| 1549 | (car (cddr occur-revert-arguments)) "/") | 1552 | (car (cddr occur-revert-arguments)) "/") |
| 1550 | "*") | 1553 | "*") |
| 1551 | (or unique-p (not interactive-p))))) | 1554 | (or unique-p (not interactive-p))))) |
| @@ -1779,7 +1782,8 @@ See also `multi-occur'." | |||
| 1779 | 42) | 1782 | 42) |
| 1780 | (window-width)) | 1783 | (window-width)) |
| 1781 | "" (occur-regexp-descr regexp)))) | 1784 | "" (occur-regexp-descr regexp)))) |
| 1782 | (occur--garbage-collect-revert-args) | 1785 | (unless (eq bufs (nth 2 occur-revert-arguments)) |
| 1786 | (occur--garbage-collect-revert-args)) | ||
| 1783 | (setq occur-revert-arguments (list regexp nlines bufs)) | 1787 | (setq occur-revert-arguments (list regexp nlines bufs)) |
| 1784 | (if (= count 0) | 1788 | (if (= count 0) |
| 1785 | (kill-buffer occur-buf) | 1789 | (kill-buffer occur-buf) |