From: Dmitry Gutov Date: Tue, 3 May 2016 21:42:43 +0000 (+0300) Subject: Clear buffer-undo-list when showing xrefs X-Git-Tag: emacs-25.0.94~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f82d8e;p=emacs.git 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. --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index b5632af13ab..540c7b0e925 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -687,7 +687,9 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (defun xref--show-xref-buffer (xrefs alist) (let ((xref-alist (xref--analyze xrefs))) (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) (xref--insert-xrefs xref-alist) (xref--xref-buffer-mode)