1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00

Erase the buffer only after fetching the new contents

* lisp/progmodes/xref.el (xref-revert-buffer):
Erase the buffer only after fetching the new contents (bug#46042).

(cherry picked from commit 5821dee094)
This commit is contained in:
Dmitry Gutov 2021-01-23 02:53:12 +02:00
parent 3443a1c698
commit 0399cc2ab5

View file

@ -876,10 +876,10 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
(let ((inhibit-read-only t)
(buffer-undo-list t))
(save-excursion
(erase-buffer)
(condition-case err
(xref--insert-xrefs
(xref--analyze (funcall xref--fetcher)))
(let ((alist (xref--analyze (funcall xref--fetcher))))
(erase-buffer)
(xref--insert-xrefs alist))
(user-error
(insert
(propertize