From: Dmitry Gutov Date: Sat, 25 May 2024 21:58:57 +0000 (+0300) Subject: xref-revert-buffer: Make inhibit-modification-hooks binding a bit safer X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=944008a0e715c5114f1128c93db2d23efe272c10;p=emacs.git 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) --- 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