mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-27 15:43:13 -07:00
Clear buffer-undo-list when showing xrefs
* lisp/progmodes/xref.el (xref--show-xref-buffer): Clear buffer-undo-list and temporarily bind it to t while rendering the buffer contents.
This commit is contained in:
parent
c68a09107c
commit
6f82d8ef7d
1 changed files with 3 additions and 1 deletions
|
|
@ -687,7 +687,9 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
|
||||||
(defun xref--show-xref-buffer (xrefs alist)
|
(defun xref--show-xref-buffer (xrefs alist)
|
||||||
(let ((xref-alist (xref--analyze xrefs)))
|
(let ((xref-alist (xref--analyze xrefs)))
|
||||||
(with-current-buffer (get-buffer-create xref-buffer-name)
|
(with-current-buffer (get-buffer-create xref-buffer-name)
|
||||||
(let ((inhibit-read-only t))
|
(setq buffer-undo-list nil)
|
||||||
|
(let ((inhibit-read-only t)
|
||||||
|
(buffer-undo-list t))
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(xref--insert-xrefs xref-alist)
|
(xref--insert-xrefs xref-alist)
|
||||||
(xref--xref-buffer-mode)
|
(xref--xref-buffer-mode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue