From 944008a0e715c5114f1128c93db2d23efe272c10 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 26 May 2024 00:58:57 +0300 Subject: [PATCH] xref-revert-buffer: Make inhibit-modification-hooks binding a bit safer * lisp/progmodes/xref.el (xref-revert-buffer): Make sure that the inhibit-modification-hooks binding does not cover xref--fetcher funcall. Only the printing step (issue mentioned in bug#53749). (cherry picked from commit 7ca238c4413284253c06ed2b060a7a0f79653b40) --- lisp/progmodes/xref.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ced860a2038..9930fe92617 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1400,11 +1400,11 @@ this variable to an alist with the following key-value pairs: "Refresh the search results in the current buffer." (interactive) (let ((inhibit-read-only t) - (buffer-undo-list t) - (inhibit-modification-hooks t)) + (buffer-undo-list t)) (save-excursion (condition-case err - (let ((alist (xref--analyze (funcall xref--fetcher)))) + (let ((alist (xref--analyze (funcall xref--fetcher))) + (inhibit-modification-hooks t)) (erase-buffer) (xref--insert-xrefs alist)) (user-error -- 2.39.5