diff options
| author | Dmitry Gutov | 2021-01-23 02:53:12 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2021-01-24 03:25:52 +0200 |
| commit | 0399cc2ab5cc64129d7e9030db7db76689e3a095 (patch) | |
| tree | d5d9565fa89c3417f8e9385955093c7bce47ed3c | |
| parent | 3443a1c698790fca0481178f08dcb45cca576a30 (diff) | |
| download | emacs-0399cc2ab5cc64129d7e9030db7db76689e3a095.tar.gz emacs-0399cc2ab5cc64129d7e9030db7db76689e3a095.zip | |
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 5821dee0949b2913c07970d6e4b8bb8e8a35f036)
| -rw-r--r-- | lisp/progmodes/xref.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index e55d2958617..7f5e76c7409 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -876,10 +876,10 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." | |||
| 876 | (let ((inhibit-read-only t) | 876 | (let ((inhibit-read-only t) |
| 877 | (buffer-undo-list t)) | 877 | (buffer-undo-list t)) |
| 878 | (save-excursion | 878 | (save-excursion |
| 879 | (erase-buffer) | ||
| 880 | (condition-case err | 879 | (condition-case err |
| 881 | (xref--insert-xrefs | 880 | (let ((alist (xref--analyze (funcall xref--fetcher)))) |
| 882 | (xref--analyze (funcall xref--fetcher))) | 881 | (erase-buffer) |
| 882 | (xref--insert-xrefs alist)) | ||
| 883 | (user-error | 883 | (user-error |
| 884 | (insert | 884 | (insert |
| 885 | (propertize | 885 | (propertize |