]> git.eshelyaron.com Git - emacs.git/commitdiff
xref-revert-buffer: Make inhibit-modification-hooks binding a bit safer
authorDmitry Gutov <dmitry@gutov.dev>
Sat, 25 May 2024 21:58:57 +0000 (00:58 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 May 2024 05:58:06 +0000 (07:58 +0200)
* 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

index ced860a2038a3aa811e5d83c0f9d127d38c39ca1..9930fe92617f04a5c83ae95d9bb5c74c286fecad 100644 (file)
@@ -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